Class ChangePasswordPermission

java.lang.Object
com.polarion.platform.security.Permission
com.polarion.platform.security.ChangePasswordPermission
All Implemented Interfaces:
IPermission

public class ChangePasswordPermission extends Permission
Change password permission class.

Available permissions:

  • com.polarion.security.password.change
  • internal com.polarion.security.password.change.USERNAME
Permission without username implies the one with it.

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:
  • Constructor Details

    • ChangePasswordPermission

      public ChangePasswordPermission(@NotNull String name)
      Constructor.
      Parameters:
      name - permission name
      Throws:
      IllegalArgumentException - if name is invalid
    • ChangePasswordPermission

      public ChangePasswordPermission()
      Constructor of permission without username.
    • ChangePasswordPermission

      public ChangePasswordPermission(boolean dummy, @NotNull String userName)
      Constructor.
      Parameters:
      dummy - true
      userName - username
  • Method Details

    • getParentPermissions

      @NotNull public IPermission[] 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 interface IPermission
      Overrides:
      getParentPermissions in class Permission
      Returns:
      array of IPermissions (not null)
    • getDynamicRoles

      @NotNull public Collection<String> getDynamicRoles(@Nullable String user)
      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 interface IPermission
      Overrides:
      getDynamicRoles in class Permission
      Parameters:
      user - name of current user
      Returns:
      Empty Collection if there are no dynamic roles, or collection of String role Ids.