Class SpringSecurityRolePrincipal
- java.lang.Object
-
- org.pentaho.platform.repository2.unified.jcr.jackrabbit.security.SpringSecurityRolePrincipal
-
public class SpringSecurityRolePrincipal extends Object implements Group
In Spring Security, there are users and roles. This class represents a Spring Security role. This class is the Jackrabbit representation of aorg.springframework.security.acls.sid.GrantedAuthoritySid
. This class was required as noGroup
implementations were found that could re-used.Why Group and not Principal? Group is more like a Spring Security role in that there can be "members" that have that role assigned. On the client side, there is code that tests to see if the principal is a group and if so creates a Spring Security role.
- Author:
- mlowery
-
-
Constructor Summary
Constructors Constructor Description SpringSecurityRolePrincipal(String name)
SpringSecurityRolePrincipal(org.springframework.security.core.GrantedAuthority authority)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addMember(Principal user)
boolean
equals(Object obj)
String
getName()
int
hashCode()
boolean
isMember(Principal member)
Enumeration<? extends Principal>
members()
boolean
removeMember(Principal user)
String
toString()
-
-
-
Constructor Detail
-
SpringSecurityRolePrincipal
public SpringSecurityRolePrincipal(String name)
-
SpringSecurityRolePrincipal
public SpringSecurityRolePrincipal(org.springframework.security.core.GrantedAuthority authority)
-
-
Method Detail
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object obj)
-
toString
public String toString()
-
members
public Enumeration<? extends Principal> members()
-
removeMember
public boolean removeMember(Principal user)
- Specified by:
removeMember
in interfaceGroup
-
-