X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Finternal%2Fauth%2FImpliedByPrincipal.java;h=7386d5fe5fedbf6bb9bacd8377adfd11295a30d5;hb=638e94cf1ad4bea9ce39232725d4e21775ce49b3;hp=829c17e35d78be824cc5913445fcbe020cb1b952;hpb=f7944a8accf7b9cfc3cffe6e6f5c611cd48f592c;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms/src/org/argeo/cms/internal/auth/ImpliedByPrincipal.java b/org.argeo.cms/src/org/argeo/cms/internal/auth/ImpliedByPrincipal.java index 829c17e35..7386d5fe5 100644 --- a/org.argeo.cms/src/org/argeo/cms/internal/auth/ImpliedByPrincipal.java +++ b/org.argeo.cms/src/org/argeo/cms/internal/auth/ImpliedByPrincipal.java @@ -1,7 +1,6 @@ package org.argeo.cms.internal.auth; import java.security.Principal; -import java.security.acl.Group; import java.util.Collections; import java.util.Enumeration; import java.util.HashSet; @@ -15,13 +14,13 @@ import org.osgi.service.useradmin.Authorization; /** * A {@link Principal} which has been implied by an {@link Authorization}. If it - * is empty it meeans this is an additional identity, otherwise it lists the + * is empty it means this is an additional identity, otherwise it lists the * users (typically the logged in user but possibly empty * {@link ImpliedByPrincipal}s) which have implied it. When an additional - * identityx is removed, the related {@link ImpliedByPrincipal}s can thus be + * identity is removed, the related {@link ImpliedByPrincipal}s can thus be * removed. */ -public final class ImpliedByPrincipal implements Group { +public final class ImpliedByPrincipal implements Principal { private final LdapName name; private Set causes = new HashSet(); @@ -41,27 +40,22 @@ public final class ImpliedByPrincipal implements Group { causes.add(userPrincipal); } - @Override public String getName() { return name.toString(); } - @Override public boolean addMember(Principal user) { throw new UnsupportedOperationException(); } - @Override public boolean removeMember(Principal user) { throw new UnsupportedOperationException(); } - @Override public boolean isMember(Principal member) { return causes.contains(member); } - @Override public Enumeration members() { return Collections.enumeration(causes); } @@ -85,6 +79,7 @@ public final class ImpliedByPrincipal implements Group { @Override public String toString() { - return name.toString() + " implied by " + causes; + // return name.toString() + " implied by " + causes; + return name.toString(); } }