Class EditGlobalPermissionsAdministrator
- java.lang.Object
-
- com.atlassian.confluence.security.administrators.DefaultPermissionsAdministrator
-
- com.atlassian.confluence.security.administrators.AbstractEditPermissionsAdministrator
-
- com.atlassian.confluence.security.administrators.EditGlobalPermissionsAdministrator
-
- All Implemented Interfaces:
EditPermissionsAdministrator
,PermissionsAdministrator
@Deprecated public class EditGlobalPermissionsAdministrator extends AbstractEditPermissionsAdministrator
Deprecated.since 7.17 UseEditGlobalPermissionsAdministrator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.atlassian.confluence.security.administrators.DefaultPermissionsAdministrator
DefaultPermissionsAdministrator.GroupPermissionRow, DefaultPermissionsAdministrator.UnlicensedPermissionRow, DefaultPermissionsAdministrator.UserPermissionRow
-
-
Field Summary
-
Fields inherited from class com.atlassian.confluence.security.administrators.AbstractEditPermissionsAdministrator
PARAMETER_PREFIX, remoteUser, setSpacePermissionChecker, userAccessor
-
Fields inherited from class com.atlassian.confluence.security.administrators.DefaultPermissionsAdministrator
permissions, spacePermissionManager
-
Fields inherited from interface com.atlassian.confluence.security.administrators.EditPermissionsAdministrator
MAX_ENTRIES
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EditGlobalPermissionsAdministrator(SpacePermissionManager spacePermissionManager, PermissionResolver permissionResolver, SetSpacePermissionChecker setSpacePermissionChecker, UserChecker userChecker, UserAccessor userAccessor)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addPermission(SpacePermission permissionToAdd)
Deprecated.Adds the given permission if the current user has permission to do so and updates the current active user count.void
applyPermissionChanges(Collection<SpacePermission> oldPermissions, Collection<SpacePermission> newPermissions)
Deprecated.Given the old permissions and new permissions, apply necessary permission changes to make old permissions the same as new permissions, then reset the current active user count.Collection<SpacePermission>
buildPermissionsFromWebForm(Map formParameters, String parameterQualifier)
Deprecated.Given a map containing the web form parameters from a permissions edit, return the list of global permissions that are represented by the formboolean
canSetPermissionOnGroup(String permission, String groupName)
Deprecated.Returns whether the remote user can set the required permission for the group(used by velocity)boolean
canSetPermissionOnUser(String permission, ConfluenceUser user)
Deprecated.Returns whether the remote user can set the required permission for the user (used by velocity)boolean
canSetSystemAdministratorPermission()
Deprecated.Returns whether the user can set the administrator permissions (used by velocity)SpacePermission
createGroupGuardPermission(String guardPermission, String groupName)
Deprecated.Creates the relevant guard permission for the groupSpacePermission
createUserGuardPermission(String guardPermission, ConfluenceUser user)
Deprecated.Creates the relevant guard permission for the userString
getAdministrativePermissionType()
Deprecated.Returns the top level permission type applicable to the current scope.Collection<SpacePermission>
getInitialPermissionsFromForm(Map requestParams)
Deprecated.Retrieve the permissions initial stateCollection<SpacePermission>
getRequestedPermissionsFromForm(Map requestParams)
Deprecated.Retrieve the state of the permissions requested by the uservoid
removePermission(SpacePermission permissionToRemove)
Deprecated.Removes the given permission if the current user has permission to do so and updates the current active user count.-
Methods inherited from class com.atlassian.confluence.security.administrators.AbstractEditPermissionsAdministrator
addAllPermissions, addGuardPermissionToGroups, addGuardPermissionToGroups, addGuardPermissionToUsers, addGuardPermissionToUsers, buildPermissionsFromWebForm, canAddPermission, denyAnonymousPermissions, getNumOfGroupEntries, getNumOfUserEntries, isGroupsToAddEmpty, isGroupsToAddTooLarge, isRemoveAllAdminPermissions, isUsersToAddEmpty, isUsersToAddTooLarge, removeAllPermissions, setGroupsToAdd, setRemoteUser, setUsersToAdd, splitPermissions
-
Methods inherited from class com.atlassian.confluence.security.administrators.DefaultPermissionsAdministrator
buildAnonymousPermissionRow, buildGroupPermissionTable, buildUnlicensedAuthenticatedPermissionRow, buildUserPermissionTable, getPermissions, resetPermissions
-
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 Detail
-
EditGlobalPermissionsAdministrator
protected EditGlobalPermissionsAdministrator(SpacePermissionManager spacePermissionManager, PermissionResolver permissionResolver, SetSpacePermissionChecker setSpacePermissionChecker, UserChecker userChecker, UserAccessor userAccessor)
Deprecated.
-
-
Method Detail
-
getAdministrativePermissionType
public String getAdministrativePermissionType()
Deprecated.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
-
addPermission
public void addPermission(SpacePermission permissionToAdd)
Deprecated.Adds the given permission if the current user has permission to do so and updates the current active user count.Does nothing silently otherwise.
- Parameters:
permissionToAdd
- the permission you want to add.
-
removePermission
public void removePermission(SpacePermission permissionToRemove)
Deprecated.Removes the given permission if the current user has permission to do so and updates the current active user count.Does nothing silently otherwise.
- Specified by:
removePermission
in interfaceEditPermissionsAdministrator
- Overrides:
removePermission
in classAbstractEditPermissionsAdministrator
- Parameters:
permissionToRemove
- the permission you want rid of.
-
createUserGuardPermission
public SpacePermission createUserGuardPermission(String guardPermission, ConfluenceUser user)
Deprecated.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
public SpacePermission createGroupGuardPermission(String guardPermission, String groupName)
Deprecated.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
public Collection<SpacePermission> getInitialPermissionsFromForm(Map requestParams)
Deprecated.Retrieve the permissions initial state- Returns:
- initial state
-
getRequestedPermissionsFromForm
public Collection<SpacePermission> getRequestedPermissionsFromForm(Map requestParams)
Deprecated.Retrieve the state of the permissions requested by the user- Returns:
- requested state
-
buildPermissionsFromWebForm
public Collection<SpacePermission> buildPermissionsFromWebForm(Map formParameters, String parameterQualifier)
Deprecated.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
-
canSetPermissionOnUser
public boolean canSetPermissionOnUser(String permission, ConfluenceUser user) throws EntityRuntimeException
Deprecated.Returns whether the remote user can set the required permission for the user (used by velocity)- Throws:
EntityRuntimeException
-
canSetPermissionOnGroup
public boolean canSetPermissionOnGroup(String permission, String groupName) throws EntityRuntimeException
Deprecated.Returns whether the remote user can set the required permission for the group(used by velocity)- Throws:
EntityRuntimeException
-
canSetSystemAdministratorPermission
public boolean canSetSystemAdministratorPermission()
Deprecated.Returns whether the user can set the administrator permissions (used by velocity)
-
applyPermissionChanges
public void applyPermissionChanges(Collection<SpacePermission> oldPermissions, Collection<SpacePermission> newPermissions) throws IllegalArgumentException
Deprecated.Given the old permissions and new permissions, apply necessary permission changes to make old permissions the same as new permissions, then reset the current active user count.- Specified by:
applyPermissionChanges
in interfaceEditPermissionsAdministrator
- Overrides:
applyPermissionChanges
in classAbstractEditPermissionsAdministrator
- Parameters:
oldPermissions
- - initial permissionsnewPermissions
- - expected permissions- Throws:
IllegalArgumentException
-
-