public class ExternalUser extends AbstractUser implements Serializable
Modifier | Constructor and Description |
---|---|
protected |
ExternalUser(Map<String,String> properties,
GroupList groupList,
RoleList roleList) |
protected |
ExternalUser(Subject subject)
Deprecated.
since 4.5 use ExternalUser(java.util.Map, info.magnolia.cms.security.auth.GroupList,
info.magnolia.cms.security.auth.RoleList) instead
|
Modifier and Type | Method and Description |
---|---|
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 this user belongs to, collected recursively including supergroups.
|
Collection<String> |
getAllRoles()
Get all roles assigned to this user, collected recursively including groups and supergroups.
|
String |
getEmail() |
Collection<String> |
getGroups()
Get groups that are directly assigned to the user.
|
String |
getIdentifier()
Gets user identifier.
|
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.
|
@Deprecated protected ExternalUser(Subject subject)
subject
- as created by login modulepublic boolean hasRole(String roleName)
User
public void removeRole(String roleName)
User
removeRole
in interface User
public void addRole(String roleName)
User
public boolean inGroup(String groupName)
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
public void setEnabled(boolean enabled)
setEnabled
in interface User
public String getLanguage()
getLanguage
in interface User
public String getName()
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 String getIdentifier()
User
getIdentifier
in interface User
public Collection<String> getGroups()
User
public Collection<String> getAllGroups()
User
getAllGroups
in interface User
public Collection<String> getRoles()
User
public Collection<String> getAllRoles()
User
getAllRoles
in interface User
Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.