Make data admin log-in more robust and easier to use.
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / internal / kernel / NodeAuthorization.java
index 2846069359a2dcb44e95864f824517a70fa5215b..ddb9730e628e105955cf0b2d9c1239b190aaa7ad 100644 (file)
@@ -6,8 +6,11 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
+import javax.security.auth.x500.X500Principal;
+
 import org.osgi.service.useradmin.Authorization;
 
+@Deprecated
 class NodeAuthorization implements Authorization {
        private final String name;
        private final String displayName;
@@ -16,7 +19,7 @@ class NodeAuthorization implements Authorization {
 
        public NodeAuthorization(String name, String displayName,
                        Collection<String> systemRoles, String[] roles) {
-               this.name = name;
+               this.name = new X500Principal(name).getName();
                this.displayName = displayName;
                this.systemRoles = Collections.unmodifiableList(new ArrayList<String>(
                                systemRoles));