Package com.polarion.platform.security
Class ChangePasswordPermission
java.lang.Object
com.polarion.platform.security.Permission
com.polarion.platform.security.ChangePasswordPermission
- All Implemented Interfaces:
IPermission
Change password permission class.
Available permissions:
com.polarion.security.password.change
- internal
com.polarion.security.password.change.USERNAME
User wanting to change its own password will get dynamic role "self".
Policy class is IUserManagementPolicy
.
- Version:
- $Revision$ $Date$
- Author:
- Stepan Roh, Polarion Software
- See Also:
-
Field Summary
Fields inherited from class com.polarion.platform.security.Permission
name
Fields inherited from interface com.polarion.platform.security.IPermission
SEPARATOR
-
Constructor Summary
ConstructorDescriptionConstructor of permission without username.ChangePasswordPermission
(boolean dummy, String userName) Constructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetDynamicRoles
(String user) Returns the collection of role IDs of dynamic roles associated with this particular permission.The collection of permissions, to which the decision about this permission is granted, if there is no record for exactly this permission.Methods inherited from class com.polarion.platform.security.Permission
denied, equals, getName, hashCode, isInCustomSet, toString
-
Constructor Details
-
ChangePasswordPermission
Constructor.- Parameters:
name
- permission name- Throws:
IllegalArgumentException
- if name is invalid
-
ChangePasswordPermission
public ChangePasswordPermission()Constructor of permission without username. -
ChangePasswordPermission
Constructor.- Parameters:
dummy
-true
userName
- username
-
-
Method Details
-
getParentPermissions
Description copied from interface:IPermission
The collection of permissions, to which the decision about this permission is granted, if there is no record for exactly this permission.For permission to be granted, none of it's parents can be denied and at least one of them must be granted. The rest can be either undefined or granted.
- Specified by:
getParentPermissions
in interfaceIPermission
- Overrides:
getParentPermissions
in classPermission
- Returns:
- array of
IPermission
s (notnull
)
-
getDynamicRoles
Description copied from interface:IPermission
Returns the collection of role IDs of dynamic roles associated with this particular permission.Dynamic roles are determined by particular permission data and by the relationship between the data and the user. The permission is allowed to perform operations which may lead to the test of the same permission - clients of this method must be aware of it.
- Specified by:
getDynamicRoles
in interfaceIPermission
- Overrides:
getDynamicRoles
in classPermission
- Parameters:
user
- name of current user- Returns:
- Empty
Collection
if there are no dynamic roles, orcollection of String
role Ids.
-