X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.security.core%2Fsrc%2Forg%2Fargeo%2Fosgi%2Fuseradmin%2FUserAdminConf.java;h=baf487bb033cda57419034d8ffac1d00e4525c4d;hb=6342d1d28f8338866c876f8b6364ce3f1eac28aa;hp=e7d0e0d5117862e12bce2acd6f366a96e7e02121;hpb=137290df09ccfb49fcdfc72b611aa8d32182342c;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.security.core/src/org/argeo/osgi/useradmin/UserAdminConf.java b/org.argeo.security.core/src/org/argeo/osgi/useradmin/UserAdminConf.java index e7d0e0d51..baf487bb0 100644 --- a/org.argeo.security.core/src/org/argeo/osgi/useradmin/UserAdminConf.java +++ b/org.argeo.security.core/src/org/argeo/osgi/useradmin/UserAdminConf.java @@ -14,24 +14,25 @@ import java.util.Map; import javax.naming.Context; +/** Properties used to configure user admins. */ public enum UserAdminConf { - /** Base DN */ + /** Base DN (cannot be configured externally) */ baseDn("dc=example,dc=com"), - /** URI of the underlying resource */ + /** URI of the underlying resource (cannot be configured externally) */ uri("ldap://localhost:10389"), /** User objectClass */ userObjectClass("inetOrgPerson"), /** Relative base DN for users */ - userBase("ou=users"), + userBase("ou=People"), /** Groups objectClass */ groupObjectClass("groupOfNames"), /** Relative base DN for users */ - groupBase("ou=groups"), + groupBase("ou=Groups"), /** Read-only source */ readOnly(null); @@ -49,8 +50,9 @@ public enum UserAdminConf { return def; } + /** For use as Java property. */ public String property() { - return getPrefix() + name(); + return getPrefix() + '.' + name(); } public String getPrefix() { @@ -73,7 +75,7 @@ public enum UserAdminConf { } public static UserAdminConf local(String property) { - return UserAdminConf.valueOf(property.substring(PREFIX.length())); + return UserAdminConf.valueOf(property.substring(PREFIX.length() + 1)); } /** Hides host and credentials. */