Class UserRolesConfig
java.lang.Object
com.polarion.platform.spi.security.UserRolesConfig
Object encapsulation of the user-roles.xml config file
This class it NOT thread safe!
- Author:
- dobisekm
-
Field Summary
-
Constructor Summary
ConstructorDescriptionUserRolesConfig
(UserRolesConfig parent, InputStream in) Parses the xml from the stream & closes it.UserRolesConfig
(UserRolesConfig parent, InputStream in, ILocation loc) Parses the xml from the stream & closes it.UserRolesConfig
(Document config) UserRolesConfig
(Document config, ILocation loc) -
Method Summary
Modifier and TypeMethodDescriptionboolean
addUserRole
(String userName, String role) getUserRoles
(String userName) getUserRoles
(String userName, boolean includeParentRoles) Returns a set of roles that belong to the specified user in the context defined for this configuration object.getUsers()
Returns the users mentioned in this configgetUsersWithRole
(String role) boolean
isGlobal()
boolean
removeRole
(String role) boolean
removeUser
(String userName) boolean
removeUserRole
(String userName, String role)
-
Field Details
-
ELM_USER_ROLES
- See Also:
-
ELM_USER
- See Also:
-
ELM_ROLE
- See Also:
-
ATTR_NAME
- See Also:
-
-
Constructor Details
-
UserRolesConfig
public UserRolesConfig() -
UserRolesConfig
-
UserRolesConfig
- Since:
- 3.7.2
-
UserRolesConfig
Parses the xml from the stream & closes it. -
UserRolesConfig
public UserRolesConfig(@Nullable UserRolesConfig parent, @NotNull InputStream in, @Nullable ILocation loc) Parses the xml from the stream & closes it.- Since:
- 3.7.2
-
-
Method Details
-
isGlobal
public boolean isGlobal()- Since:
- 3.5.2
-
serialize
-
getUsers
Returns the users mentioned in this config- Returns:
- Collection of String
-
getUserRoles
-
getUserRoles
Returns a set of roles that belong to the specified user in the context defined for this configuration object.- Parameters:
userName
- user ID.includeParentRoles
- if true, the resulting set will also contain the roles defined in the parent context (i.e. global roles associated with the user).- Since:
- 3.20.1
-
getUsersWithRole
-
removeUser
-
removeRole
-
addUserRole
-
removeUserRole
-