Class EditSpacePermissionsAdministrator
java.lang.Object
com.atlassian.confluence.impl.security.administrators.DefaultPermissionsAdministrator
com.atlassian.confluence.impl.security.administrators.AbstractEditPermissionsAdministrator
com.atlassian.confluence.impl.security.administrators.EditSpacePermissionsAdministrator
- All Implemented Interfaces:
EditPermissionsAdministrator
,PermissionsAdministrator
- Since:
- 7.17
-
Field Summary
Fields inherited from class com.atlassian.confluence.impl.security.administrators.AbstractEditPermissionsAdministrator
PARAMETER_PREFIX, remoteUser
Fields inherited from interface com.atlassian.confluence.security.administrators.EditPermissionsAdministrator
MAX_ENTRIES
-
Constructor Summary
ConstructorDescriptionEditSpacePermissionsAdministrator
(SpacePermissionManager spacePermissionManager, PermissionResolver permissionResolver, SetSpacePermissionChecker setSpacePermissionChecker, ConfluenceUserResolver userResolver, GroupResolver groupResolver) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPermission
(SpacePermission permissionToAdd) Adds the given permission if the current user has permission to do so, otherwise does nothing silently.buildPermissionsFromWebForm
(Map formParameters, String parameterQualifier) Given a map containing the web form parameters from a permissions edit, return the list of global permissions that are represented by the formcreateGroupGuardPermission
(String guardPermission, String groupName) Creates the relevant guard permission for the groupcreateUserGuardPermission
(String guardPermission, ConfluenceUser user) Creates the relevant guard permission for the userReturns the top level permission type applicable to the current scope.getInitialPermissionsFromForm
(Map requestParams) Retrieve the permissions initial stategetRequestedPermissionsFromForm
(Map requestParams) Retrieve the state of the permissions requested by the uservoid
removeAllPermissions
(Set<SpacePermission> permissionsToRemove) Removes the given set of permissions if the current user has permission to do so, otherwise does nothing silently.void
Methods inherited from class com.atlassian.confluence.impl.security.administrators.AbstractEditPermissionsAdministrator
addAllPermissions, addGuardPermissionToGroups, addGuardPermissionToGroups, addGuardPermissionToUsers, addGuardPermissionToUsers, applyPermissionChanges, buildPermissionsFromWebForm, canAddPermission, denyAnonymousPermissions, getNumOfGroupEntries, getNumOfUserEntries, isGroupsToAddEmpty, isGroupsToAddTooLarge, isRemoveAllAdminPermissions, isUsersToAddEmpty, isUsersToAddTooLarge, removePermission, setGroupsToAdd, setRemoteUser, setUsersToAdd, splitPermissions
Methods inherited from class com.atlassian.confluence.impl.security.administrators.DefaultPermissionsAdministrator
buildAnonymousPermissionRow, buildGroupPermissionTable, buildUnlicensedAuthenticatedPermissionRow, buildUserPermissionTable, getPermissions
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.confluence.security.administrators.PermissionsAdministrator
buildAnonymousPermissionRow, buildGroupPermissionTable, buildUnlicensedAuthenticatedPermissionRow, buildUserPermissionTable, getPermissions
-
Constructor Details
-
EditSpacePermissionsAdministrator
public EditSpacePermissionsAdministrator(SpacePermissionManager spacePermissionManager, PermissionResolver permissionResolver, SetSpacePermissionChecker setSpacePermissionChecker, ConfluenceUserResolver userResolver, GroupResolver groupResolver)
-
-
Method Details
-
getAdministrativePermissionType
Description copied from interface:EditPermissionsAdministrator
Returns the top level permission type applicable to the current scope. That is, the permission that must exist at least once per space, or globally.- Returns:
- top level permission type
-
removeAllPermissions
Description copied from interface:EditPermissionsAdministrator
Removes the given set of permissions if the current user has permission to do so, otherwise does nothing silently.- Specified by:
removeAllPermissions
in interfaceEditPermissionsAdministrator
- Overrides:
removeAllPermissions
in classAbstractEditPermissionsAdministrator
- Parameters:
permissionsToRemove
- the permission you want rid of.
-
addPermission
Description copied from interface:EditPermissionsAdministrator
Adds the given permission if the current user has permission to do so, otherwise does nothing silently.- Parameters:
permissionToAdd
- the permission you want rid of.
-
createUserGuardPermission
Description copied from interface:EditPermissionsAdministrator
Creates the relevant guard permission for the user- Parameters:
guardPermission
- - the name of the guard permission to createuser
- - name of the user to add the permission to- Returns:
- spacepermission object for the user
-
createGroupGuardPermission
Description copied from interface:EditPermissionsAdministrator
Creates the relevant guard permission for the group- Parameters:
guardPermission
- - the name of the guard permission to creategroupName
- - name of group to add the permission to- Returns:
- spacepermission object for the user
-
getInitialPermissionsFromForm
Description copied from interface:EditPermissionsAdministrator
Retrieve the permissions initial state- Returns:
- initial state
-
getRequestedPermissionsFromForm
Description copied from interface:EditPermissionsAdministrator
Retrieve the state of the permissions requested by the user- Returns:
- requested state
-
buildPermissionsFromWebForm
public Collection<SpacePermission> buildPermissionsFromWebForm(Map formParameters, String parameterQualifier) Description copied from interface:EditPermissionsAdministrator
Given a map containing the web form parameters from a permissions edit, return the list of global permissions that are represented by the form- Parameters:
formParameters
- the map of form parametersparameterQualifier
- distinguishes the set of parameters from other sets of parameters used to represent permissions in the same form.- Returns:
- a list of the permissions in the form
-
setSpace
-