|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.security.AbstractUser info.magnolia.cms.security.ExternalUser
public class ExternalUser
A user which is not stored in Magnolia. For instance a user stored in LDAP or AD.
Field Summary |
---|
Fields inherited from class info.magnolia.cms.security.AbstractUser |
---|
subject |
Constructor Summary | |
---|---|
protected |
ExternalUser(Subject subject)
|
Method Summary | |
---|---|
void |
addGroup(String groupName)
Adds this user to a group. |
void |
addRole(String roleName)
Adds a role to this user. |
Collection<String> |
getAllGroups()
Get all groups to which this user belongs to, collected recursively including. |
Collection<String> |
getAllRoles()
Get all roles assigned to this user, collected recursively including groups/subgroups. |
String |
getEmail()
|
Collection<String> |
getGroups()
Get groups that are directly assigned to the user. |
String |
getLanguage()
|
String |
getName()
|
String |
getPassword()
|
String |
getProperty(String propertyName)
Gets an arbitrary property from this user. |
Collection<String> |
getRoles()
Get roles that are directly assigned to the user. |
boolean |
hasRole(String roleName)
Is this user in a specified role? |
boolean |
inGroup(String groupName)
Is this user in a specified group? |
boolean |
isEnabled()
Returns false if the user was explicitly disabled. |
void |
removeGroup(String groupName)
Remove a group. |
void |
removeRole(String roleName)
Remove a role. |
void |
setEnabled(boolean enabled)
|
void |
setProperty(String propertyName,
String value)
Sets an arbitrary property for this user. |
Methods inherited from class info.magnolia.cms.security.AbstractUser |
---|
getSubject, setSubject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ExternalUser(Subject subject)
subject
- as created by login moduleMethod Detail |
---|
public boolean hasRole(String roleName)
User
hasRole
in interface User
roleName
- the name of the role
public void removeRole(String roleName)
User
removeRole
in interface User
public void addRole(String roleName)
User
addRole
in interface User
roleName
- the name of the rolepublic boolean inGroup(String groupName)
inGroup
in interface User
public void removeGroup(String groupName) throws UnsupportedOperationException
removeGroup
in interface User
UnsupportedOperationException
public void addGroup(String groupName) throws UnsupportedOperationException
addGroup
in interface User
UnsupportedOperationException
public boolean isEnabled()
User
isEnabled
in interface User
public void setEnabled(boolean enabled)
setEnabled
in interface User
public String getLanguage()
getLanguage
in interface User
public String getName()
getName
in interface User
public String getPassword()
getPassword
in interface User
public String getEmail()
public String getProperty(String propertyName)
User
getProperty
in interface User
public void setProperty(String propertyName, String value)
User
setProperty
in interface User
public Collection<String> getGroups()
User
getGroups
in interface User
public Collection<String> getAllGroups()
User
getAllGroups
in interface User
public Collection<String> getRoles()
User
getRoles
in interface User
public Collection<String> getAllRoles()
User
getAllRoles
in interface User
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |