Rename CmsSession into CmsView, and make it exclusively related to the Display (and...
[lgpl/argeo-commons.git] / org.argeo.security.jackrabbit / src / org / argeo / security / jackrabbit / ArgeoSecurityManager.java
index 0d9d980e0022382d89aaabfec79ba59ea70bb597..978be436b648623c1e6cf00199a226c26c96ace0 100644 (file)
@@ -60,9 +60,12 @@ public class ArgeoSecurityManager extends DefaultSecurityManager {
                                .getPrincipals(X500Principal.class);
                if (userPrincipal.isEmpty())
                        return super.getUserID(subject, workspaceName);
-               if (userPrincipal.size() > 1)
-                       throw new RuntimeException("Multiple user principals "
-                                       + userPrincipal);
+               if (userPrincipal.size() > 1) {
+                       StringBuilder buf = new StringBuilder();
+                       for (X500Principal principal : userPrincipal)
+                               buf.append(' ').append('\"').append(principal).append('\"');
+                       throw new RuntimeException("Multiple user principals:" + buf);
+               }
                return userPrincipal.iterator().next().getName();
                // Authentication authentication = SecurityContextHolder.getContext()
                // .getAuthentication();