public class EditGlobalPermissionsAdministrator extends AbstractEditPermissionsAdministrator
DefaultPermissionsAdministrator.GroupPermissionRow, DefaultPermissionsAdministrator.UnlicensedPermissionRow, DefaultPermissionsAdministrator.UserPermissionRow
PARAMETER_PREFIX, remoteUser, searchEntitiesManager, setSpacePermissionChecker, userAccessor
permissions, spacePermissionManager
MAX_ENTRIES
Modifier | Constructor and Description |
---|---|
protected |
EditGlobalPermissionsAdministrator(SpacePermissionManager spacePermissionManager,
PermissionResolver permissionResolver,
SetSpacePermissionChecker setSpacePermissionChecker,
SearchEntitiesManager searchEntitiesManager,
SettingsManager settingsManager,
UserChecker userChecker)
|
protected |
EditGlobalPermissionsAdministrator(SpacePermissionManager spacePermissionManager,
PermissionResolver permissionResolver,
SetSpacePermissionChecker setSpacePermissionChecker,
SearchEntitiesManager searchEntitiesManager,
UserChecker userChecker)
|
protected |
EditGlobalPermissionsAdministrator(SpacePermissionManager spacePermissionManager,
PermissionResolver permissionResolver,
SetSpacePermissionChecker setSpacePermissionChecker,
SearchEntitiesManager searchEntitiesManager,
UserChecker userChecker,
UserAccessor userAccessor)
|
protected |
EditGlobalPermissionsAdministrator(SpacePermissionManager spacePermissionManager,
PermissionResolver permissionResolver,
SetSpacePermissionChecker setSpacePermissionChecker,
UserChecker userChecker,
UserAccessor userAccessor) |
Modifier and Type | Method and Description |
---|---|
void |
addPermission(SpacePermission permissionToAdd)
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)
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)
Given a map containing the web form parameters from a permissions edit, return the list of global permissions
that are represented by the form
|
boolean |
canSetPermissionOnGroup(String permission,
String groupName)
Returns whether the remote user can set the required permission for the group(used by velocity)
|
boolean |
canSetPermissionOnUser(String permission,
ConfluenceUser user)
Returns whether the remote user can set the required permission for the user (used by velocity)
|
boolean |
canSetPermissionOnUser(String permission,
String username)
Deprecated.
|
boolean |
canSetSystemAdministratorPermission()
Returns whether the user can set the administrator permissions (used by velocity)
|
SpacePermission |
createGroupGuardPermission(String guardPermission,
String groupName)
Creates the relevant guard permission for the group
|
SpacePermission |
createUserGuardPermission(String guardPermission,
ConfluenceUser user)
Creates the relevant guard permission for the user
|
SpacePermission |
createUserGuardPermission(String guardPermission,
String userName)
Deprecated.
|
String |
getAdministrativePermissionType()
Returns the top level permission type applicable to the current scope.
|
Collection<SpacePermission> |
getInitialPermissionsFromForm(Map requestParams)
Retrieve the permissions initial state
|
Collection<SpacePermission> |
getRequestedPermissionsFromForm(Map requestParams)
Retrieve the state of the permissions requested by
the user
|
void |
removePermission(SpacePermission permissionToRemove)
Removes the given permission if the current user has permission to do so and updates the current active user count.
|
addAllPermissions, addGuardPermissionToGroups, addGuardPermissionToUsers, buildPermissionsFromWebForm, canAddPermission, denyAnonymousPermissions, getNumOfGroupEntries, getNumOfUserEntries, isGroupsToAddEmpty, isGroupsToAddTooLarge, isRemoveAllAdminPermissions, isUsersToAddEmpty, isUsersToAddTooLarge, removeAllPermissions, setGroupsToAdd, setRemoteUser, setUsersToAdd, splitPermissions
buildAnonymousPermissionRow, buildGroupPermissionTable, buildUnlicensedAuthenticatedPermissionRow, buildUserPermissionTable, getPermissions, resetPermissions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
buildAnonymousPermissionRow, buildGroupPermissionTable, buildUnlicensedAuthenticatedPermissionRow, buildUserPermissionTable, getPermissions
@Deprecated protected EditGlobalPermissionsAdministrator(SpacePermissionManager spacePermissionManager, PermissionResolver permissionResolver, SetSpacePermissionChecker setSpacePermissionChecker, SearchEntitiesManager searchEntitiesManager, SettingsManager settingsManager, UserChecker userChecker)
@Deprecated protected EditGlobalPermissionsAdministrator(SpacePermissionManager spacePermissionManager, PermissionResolver permissionResolver, SetSpacePermissionChecker setSpacePermissionChecker, SearchEntitiesManager searchEntitiesManager, UserChecker userChecker)
@Deprecated protected EditGlobalPermissionsAdministrator(SpacePermissionManager spacePermissionManager, PermissionResolver permissionResolver, SetSpacePermissionChecker setSpacePermissionChecker, SearchEntitiesManager searchEntitiesManager, UserChecker userChecker, UserAccessor userAccessor)
protected EditGlobalPermissionsAdministrator(SpacePermissionManager spacePermissionManager, PermissionResolver permissionResolver, SetSpacePermissionChecker setSpacePermissionChecker, UserChecker userChecker, UserAccessor userAccessor)
public String getAdministrativePermissionType()
public void addPermission(SpacePermission permissionToAdd)
Does nothing silently otherwise.
permissionToAdd
- the permission you want to add.public void removePermission(SpacePermission permissionToRemove)
Does nothing silently otherwise.
removePermission
in interface EditPermissionsAdministrator
removePermission
in class AbstractEditPermissionsAdministrator
permissionToRemove
- the permission you want rid of.@Deprecated public SpacePermission createUserGuardPermission(String guardPermission, String userName)
guardPermission
- - the name of the guard permission to createuserName
- - name of the user to add the permission topublic SpacePermission createUserGuardPermission(String guardPermission, ConfluenceUser user)
guardPermission
- - the name of the guard permission to createuser
- - name of the user to add the permission topublic SpacePermission createGroupGuardPermission(String guardPermission, String groupName)
guardPermission
- - the name of the guard permission to creategroupName
- - name of group to add the permission topublic Collection<SpacePermission> getInitialPermissionsFromForm(Map requestParams)
public Collection<SpacePermission> getRequestedPermissionsFromForm(Map requestParams)
public Collection<SpacePermission> buildPermissionsFromWebForm(Map formParameters, String parameterQualifier)
formParameters
- the map of form parametersparameterQualifier
- distinguishes the set of parameters from other sets of parameters used to represent
permissions in the same form.public boolean canSetPermissionOnUser(String permission, String username) throws EntityRuntimeException
canSetPermissionOnUser(String, com.atlassian.confluence.user.ConfluenceUser)
EntityRuntimeException
public boolean canSetPermissionOnUser(String permission, ConfluenceUser user) throws EntityRuntimeException
EntityRuntimeException
public boolean canSetPermissionOnGroup(String permission, String groupName) throws EntityRuntimeException
EntityRuntimeException
public boolean canSetSystemAdministratorPermission()
public void applyPermissionChanges(Collection<SpacePermission> oldPermissions, Collection<SpacePermission> newPermissions) throws IllegalArgumentException
applyPermissionChanges
in interface EditPermissionsAdministrator
applyPermissionChanges
in class AbstractEditPermissionsAdministrator
oldPermissions
- - initial permissionsnewPermissions
- - expected permissionsIllegalArgumentException
Copyright © 2003–2017 Atlassian. All rights reserved.