diff options
author | Simon Rettberg | 2017-08-16 18:26:02 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-08-16 18:26:02 +0200 |
commit | 1f490c5aa0714c622b03fc2ec56909af7703ccab (patch) | |
tree | a9184dddff3c1e3d0927070f9b225ef8ce8e4d9f /src/main/java/org/openslx/satserver | |
parent | Util: Add isEmpty helper for strings (diff) | |
download | tmlite-bwlp-1f490c5aa0714c622b03fc2ec56909af7703ccab.tar.gz tmlite-bwlp-1f490c5aa0714c622b03fc2ec56909af7703ccab.tar.xz tmlite-bwlp-1f490c5aa0714c622b03fc2ec56909af7703ccab.zip |
[*ldap*] Support new mapping features and fixNumeric switch
Diffstat (limited to 'src/main/java/org/openslx/satserver')
-rw-r--r-- | src/main/java/org/openslx/satserver/util/LdapMapping.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/satserver/util/LdapMapping.java b/src/main/java/org/openslx/satserver/util/LdapMapping.java new file mode 100644 index 0000000..f734a1d --- /dev/null +++ b/src/main/java/org/openslx/satserver/util/LdapMapping.java @@ -0,0 +1,44 @@ +package org.openslx.satserver.util; + +import com.google.gson.annotations.Expose; + +public class LdapMapping +{ + @Expose + public String uid; // AD: sAMAccountName + @Expose + public String homemount; // AD: homeDirectory + @Expose + public String localhome; // AD: none, LDAP: homeDirectory + @Expose + public String posixAccount; // AD: user + @Expose + public String shadowAccount; // AD: user + @Expose + public String uidnumber; // AD: objectSid + + @Override + public String toString() + { + StringBuilder sb = new StringBuilder(); + if ( !Util.isEmpty( uid ) ) { + sb.append( "map.uid=" + uid + "\n" ); + } + if ( !Util.isEmpty( homemount ) ) { + sb.append( "map.homemount=" + homemount + "\n" ); + } + if ( !Util.isEmpty( localhome ) ) { + sb.append( "map.localhome=" + localhome + "\n" ); + } + if ( !Util.isEmpty( posixAccount ) ) { + sb.append( "map.posixAccount=" + posixAccount + "\n" ); + } + if ( !Util.isEmpty( shadowAccount ) ) { + sb.append( "map.shadowAccount=" + shadowAccount + "\n" ); + } + if ( !Util.isEmpty( uidnumber ) ) { + sb.append( "map.uidnumber=" + uidnumber + "\n" ); + } + return sb.toString(); + } +}
\ No newline at end of file |