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 TypeMethodDescriptionboolean
canAddContextRoleToUser
(String userName, String roleId, IContextId ctx) Permission isUserManagementPermission.ACTION_MANAGE_USER
.boolean
canAddGlobalRoleToUser
(String userName, String roleId) Permission isUserManagementPermission.ACTION_MANAGE_USER
.boolean
canChangePassword
(String userName) Permission isChangePasswordPermission
.boolean
canCreateContextRole
(String roleId, IContextId contextId) Permission isUserManagementPermission.ACTION_MANAGE_ROLE
.boolean
canCreateGlobalRole
(String roleId) Permission isUserManagementPermission.ACTION_MANAGE_ROLE
.boolean
canCreateUser
(String userName) Permission isUserManagementPermission.ACTION_MANAGE_USER
.boolean
canManageRoles
(IContextId contextId) Permission isUserManagementPermission.ACTION_MANAGE_ROLE
.boolean
canManageUsers
(IContextId contextId) Permission isUserManagementPermission.ACTION_MANAGE_USER
.boolean
canRemoveContextRole
(String roleId, IContextId contextId) Permission isUserManagementPermission.ACTION_MANAGE_ROLE
.boolean
canRemoveContextRoleFromUser
(String userName, String roleId, IContextId ctx) Permission isUserManagementPermission.ACTION_MANAGE_USER
.boolean
canRemoveGlobalRole
(String roleId) Permission isUserManagementPermission.ACTION_MANAGE_ROLE
.boolean
canRemoveGlobalRoleFromUser
(String userName, String roleId) Permission isUserManagementPermission.ACTION_MANAGE_USER
.boolean
canRemoveUser
(String userName) Permission isUserManagementPermission.ACTION_MANAGE_USER
.void
checkCanAddContextRoleToUser
(String userName, String roleId, IContextId ctx) void
checkCanAddGlobalRoleToUser
(String userName, String roleId) void
checkCanChangePassword
(String userName) void
checkCanCreateContextRole
(String roleId, IContextId contextId) void
checkCanCreateGlobalRole
(String roleId) void
checkCanCreateUser
(String userName) void
checkCanRemoveContextRole
(String roleId, IContextId contextId) void
checkCanRemoveContextRoleFromUser
(String userName, String roleId, IContextId ctx) void
checkCanRemoveGlobalRole
(String roleId) void
checkCanRemoveGlobalRoleFromUser
(String userName, String roleId) void
checkCanRemoveUser
(String userName)
-
Method Details
-
canManageUsers
Permission isUserManagementPermission.ACTION_MANAGE_USER
.- Parameters:
contextId
- The context ID (can benull
for Global administration)- Returns:
true
If 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 benull
for Global administration)- Returns:
true
If 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:
true
If the current user is allowed to do this operation
-
canChangePassword
Permission isChangePasswordPermission
.- Parameters:
userName
- user name- Returns:
true
If the current user is allowed to do this operation
-
canRemoveUser
Permission isUserManagementPermission.ACTION_MANAGE_USER
.- Parameters:
userName
- user name- Returns:
true
If the current user is allowed to do this operation
-
canCreateGlobalRole
Permission isUserManagementPermission.ACTION_MANAGE_ROLE
.- Parameters:
roleId
- role id- Returns:
true
If the current user is allowed to do this operation
-
canRemoveGlobalRole
Permission isUserManagementPermission.ACTION_MANAGE_ROLE
.- Parameters:
roleId
- role id- Returns:
true
If the current user is allowed to do this operation
-
canCreateContextRole
Permission isUserManagementPermission.ACTION_MANAGE_ROLE
.- Parameters:
roleId
- role idcontextId
- The context ID- Returns:
true
If the current user is allowed to do this operation
-
canRemoveContextRole
Permission isUserManagementPermission.ACTION_MANAGE_ROLE
.- Parameters:
roleId
- role idcontextId
- The context ID- Returns:
true
If the current user is allowed to do this operation
-
canAddGlobalRoleToUser
Permission isUserManagementPermission.ACTION_MANAGE_USER
.- Parameters:
userName
- user nameroleId
- role id- Returns:
true
If the current user is allowed to do this operation
-
canRemoveGlobalRoleFromUser
Permission isUserManagementPermission.ACTION_MANAGE_USER
.- Parameters:
userName
- user nameroleId
- role id- Returns:
true
If 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:
true
If 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:
true
If 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
-