Interface PersonService.Validator
- Enclosing interface:
- PersonService
public static interface PersonService.Validator
Provides methods for validating the CRUD methods.
-
Method Summary
Modifier and TypeMethodDescriptionvalidateAddMembership
(String username, String groupName) Validate that the requesting user has permission to add the given user to the given group.validateChangeMyPassword
(PasswordChangeDetails passwordChangeDetails) Validate that the input supplied for changing current user's password is valid.validateChangePassword
(String userName, String password) Validate that the input supplied for changing a user's password is valid.Validate that the requesting user has Confluence Admin permissions.validateDelete
(Person personToDelete) Validate that the current user has permissions to remove the given personvalidateDisable
(String username) Validate that the requesting user has permission to disable the given user.validateEnable
(String username) Validate that the requesting user has permission to enable the given user.validateRemoveMembership
(String username, String groupName) Validate that the requesting user has permission to remove the given user from the given group.validateUpdateUser
(UserDetailsForUpdate userDetailsForUpdate) Validate that the input supplied for changing current user's details is valid.validateUpdateUser
(String username, UserDetailsForUpdate userDetailsForUpdate) Validate that the input supplied for changing other user's details is valid.validateUserCreate
(UserDetailsForCreation userDetailsForCreation) Validate the correctness of user details for a new user creationValidate that current user can view user profiles
-
Method Details
-
validateView
ValidationResult validateView()Validate that current user can view user profiles- Returns:
- an immutable Validation result.
-
validateDisable
Validate that the requesting user has permission to disable the given user.- Parameters:
username
- The username identifying the given user.- Since:
- 8.2.0
-
validateEnable
Validate that the requesting user has permission to enable the given user.- Parameters:
username
- The username identifying the given user.- Since:
- 8.2.0
-
validateDelete
Validate that the current user has permissions to remove the given person- Parameters:
personToDelete
-- Returns:
- an immutable Validation result
- Since:
- 6.13.0
-
validateAddMembership
Validate that the requesting user has permission to add the given user to the given group.- Parameters:
username
- The username identifying the given user.groupName
- The group name identifying the given group.- Returns:
- ValidationResult
- Since:
- 8.2.0
-
validateRemoveMembership
Validate that the requesting user has permission to remove the given user from the given group.- Parameters:
username
- The username identifying the given user.groupName
- The group name identifying the given group.- Returns:
- ValidationResult
- Since:
- 8.2.0
-
validateConfluenceAdmin
ValidationResult validateConfluenceAdmin()Validate that the requesting user has Confluence Admin permissions.- Returns:
- ValidationResult
-
validateUserCreate
Validate the correctness of user details for a new user creation- Parameters:
userDetailsForCreation
- UserDetails- Returns:
- ValidationResult
- Since:
- 8.4.0
-
validateChangePassword
Validate that the input supplied for changing a user's password is valid. It also includes appropriate permission checks.- Parameters:
userName
- User Namepassword
- New password- Returns:
- an immutable Validation result
- Since:
- 8.4.0
-
validateChangeMyPassword
Validate that the input supplied for changing current user's password is valid. It also includes appropriate permission checks.- Parameters:
passwordChangeDetails
- password change details- Returns:
- an immutable Validation result
- Since:
- 8.4.0
-
validateUpdateUser
Validate that the input supplied for changing current user's details is valid. It also includes appropriate permission checks.- Parameters:
userDetailsForUpdate
- password change details- Returns:
- an immutable Validation result
- Since:
- 9.3.0
-
validateUpdateUser
Validate that the input supplied for changing other user's details is valid. It also includes appropriate permission checks.- Parameters:
username
- username of the user to updateuserDetailsForUpdate
- password change details- Returns:
- an immutable Validation result
- Since:
- 9.3.0
-