Package com.polarion.platform.security
Interface IUserManagementPolicy
- All Known Implementing Classes:
UserManagementPolicy
public interface IUserManagementPolicy
User management policy class.
- Version:
- $Revision$ $Date$
- Author:
- Stepan Roh, Polarion Software
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanAddContextRoleToUser(String userName, String roleId, IContextId ctx) Permission isUserManagementPermission.ACTION_MANAGE_USER.booleancanAddGlobalRoleToUser(String userName, String roleId) Permission isUserManagementPermission.ACTION_MANAGE_USER.booleancanChangePassword(String userName) Permission isChangePasswordPermission.booleancanCreateContextRole(String roleId, IContextId contextId) Permission isUserManagementPermission.ACTION_MANAGE_ROLE.booleancanCreateGlobalRole(String roleId) Permission isUserManagementPermission.ACTION_MANAGE_ROLE.booleancanCreateUser(String userName) Permission isUserManagementPermission.ACTION_MANAGE_USER.booleancanManageRoles(IContextId contextId) Permission isUserManagementPermission.ACTION_MANAGE_ROLE.booleancanManageUsers(IContextId contextId) Permission isUserManagementPermission.ACTION_MANAGE_USER.booleancanRemoveContextRole(String roleId, IContextId contextId) Permission isUserManagementPermission.ACTION_MANAGE_ROLE.booleancanRemoveContextRoleFromUser(String userName, String roleId, IContextId ctx) Permission isUserManagementPermission.ACTION_MANAGE_USER.booleancanRemoveGlobalRole(String roleId) Permission isUserManagementPermission.ACTION_MANAGE_ROLE.booleancanRemoveGlobalRoleFromUser(String userName, String roleId) Permission isUserManagementPermission.ACTION_MANAGE_USER.booleancanRemoveUser(String userName) Permission isUserManagementPermission.ACTION_MANAGE_USER.voidcheckCanAddContextRoleToUser(String userName, String roleId, IContextId ctx) voidcheckCanAddGlobalRoleToUser(String userName, String roleId) voidcheckCanChangePassword(String userName) voidcheckCanCreateContextRole(String roleId, IContextId contextId) voidcheckCanCreateGlobalRole(String roleId) voidcheckCanCreateUser(String userName) voidcheckCanRemoveContextRole(String roleId, IContextId contextId) voidcheckCanRemoveContextRoleFromUser(String userName, String roleId, IContextId ctx) voidcheckCanRemoveGlobalRole(String roleId) voidcheckCanRemoveGlobalRoleFromUser(String userName, String roleId) voidcheckCanRemoveUser(String userName)
-
Method Details
-
canManageUsers
Permission isUserManagementPermission.ACTION_MANAGE_USER.- Parameters:
contextId- The context ID (can benullfor Global administration)- Returns:
trueIf the current user has permission to manage users in the given Context.- Since:
- 3.24.10
-
canManageRoles
Permission isUserManagementPermission.ACTION_MANAGE_ROLE.- Parameters:
contextId- The context ID (can benullfor Global administration)- Returns:
trueIf the current user has permission to manage roles in the given Context.- Since:
- 3.24.10
-
canCreateUser
Permission isUserManagementPermission.ACTION_MANAGE_USER.- Parameters:
userName- user name- Returns:
trueIf the current user is allowed to do this operation
-
canChangePassword
Permission isChangePasswordPermission.- Parameters:
userName- user name- Returns:
trueIf the current user is allowed to do this operation
-
canRemoveUser
Permission isUserManagementPermission.ACTION_MANAGE_USER.- Parameters:
userName- user name- Returns:
trueIf the current user is allowed to do this operation
-
canCreateGlobalRole
Permission isUserManagementPermission.ACTION_MANAGE_ROLE.- Parameters:
roleId- role id- Returns:
trueIf the current user is allowed to do this operation
-
canRemoveGlobalRole
Permission isUserManagementPermission.ACTION_MANAGE_ROLE.- Parameters:
roleId- role id- Returns:
trueIf the current user is allowed to do this operation
-
canCreateContextRole
Permission isUserManagementPermission.ACTION_MANAGE_ROLE.- Parameters:
roleId- role idcontextId- The context ID- Returns:
trueIf the current user is allowed to do this operation
-
canRemoveContextRole
Permission isUserManagementPermission.ACTION_MANAGE_ROLE.- Parameters:
roleId- role idcontextId- The context ID- Returns:
trueIf the current user is allowed to do this operation
-
canAddGlobalRoleToUser
Permission isUserManagementPermission.ACTION_MANAGE_USER.- Parameters:
userName- user nameroleId- role id- Returns:
trueIf the current user is allowed to do this operation
-
canRemoveGlobalRoleFromUser
Permission isUserManagementPermission.ACTION_MANAGE_USER.- Parameters:
userName- user nameroleId- role id- Returns:
trueIf the current user is allowed to do this operation
-
canAddContextRoleToUser
Permission isUserManagementPermission.ACTION_MANAGE_USER.- Parameters:
userName- user nameroleId- role idctx- The context ID- Returns:
trueIf the current user is allowed to do this operation
-
canRemoveContextRoleFromUser
Permission isUserManagementPermission.ACTION_MANAGE_USER.- Parameters:
userName- user nameroleId- role idctx- The context ID- Returns:
trueIf the current user is allowed to do this operation
-
checkCanCreateUser
- Throws:
PermissionDeniedException
-
checkCanChangePassword
- Throws:
PermissionDeniedException
-
checkCanRemoveUser
- Throws:
PermissionDeniedException
-
checkCanCreateGlobalRole
- Throws:
PermissionDeniedException
-
checkCanRemoveGlobalRole
- Throws:
PermissionDeniedException
-
checkCanCreateContextRole
void checkCanCreateContextRole(String roleId, IContextId contextId) throws PermissionDeniedException - Throws:
PermissionDeniedException
-
checkCanRemoveContextRole
void checkCanRemoveContextRole(String roleId, IContextId contextId) throws PermissionDeniedException - Throws:
PermissionDeniedException
-
checkCanAddGlobalRoleToUser
- Throws:
PermissionDeniedException
-
checkCanRemoveGlobalRoleFromUser
void checkCanRemoveGlobalRoleFromUser(String userName, String roleId) throws PermissionDeniedException - Throws:
PermissionDeniedException
-
checkCanAddContextRoleToUser
void checkCanAddContextRoleToUser(String userName, String roleId, IContextId ctx) throws PermissionDeniedException - Throws:
PermissionDeniedException
-
checkCanRemoveContextRoleFromUser
void checkCanRemoveContextRoleFromUser(String userName, String roleId, IContextId ctx) throws PermissionDeniedException - Throws:
PermissionDeniedException
-