@ParametersAreNonnullByDefault public interface SpacePermissionManager extends SpacePermissionSaver
PermissionManager
.PermissionManager
Modifier and Type | Method and Description |
---|---|
void |
createDefaultSpacePermissions(Space space) |
void |
createInitialSpacePermissions(Space space)
Deprecated.
|
void |
createPrivateSpacePermissions(Space space) |
void |
flushCaches() |
List<SpacePermission> |
getAllPermissionsForGroup(String group) |
Set<SpacePermission> |
getDefaultGlobalPermissions()
Returns the default global permissions that are created when Confluence is set up.
|
List<SpacePermission> |
getGlobalPermissions() |
List<SpacePermission> |
getGlobalPermissions(String permissionType) |
Map<String,Long> |
getGroupsForPermissionType(String permissionType,
Space space) |
Collection<com.atlassian.user.Group> |
getGroupsWithPermissions(Space space)
Returns all groups which have permissions in a space or on a global level.
|
Map<String,Long> |
getUsersForPermissionType(String permissionType,
Space space) |
Collection<com.atlassian.user.User> |
getUsersWithPermissions(Space space)
Returns a collection of user objects with VIEWSPACE_PERMISSION in the space.
|
boolean |
groupHasPermission(String permissionType,
Space space,
String group)
Checks whether the given group has the given permission
|
boolean |
hasAllPermissions(List<String> permissionTypes,
Space space,
com.atlassian.user.User user)
Determines if remoteUser has all of the given permissions in space
|
boolean |
hasPermission(List permissionTypes,
Space space,
com.atlassian.user.User remoteUser)
Deprecated.
|
boolean |
hasPermission(String permissionType,
Space space,
com.atlassian.user.User remoteUser)
Determines if remoteUser has the given permission in space
|
boolean |
hasPermissionForSpace(com.atlassian.user.User user,
List permissionTypes,
Space space) |
boolean |
hasPermissionNoExemptions(String permissionType,
Space space,
com.atlassian.user.User remoteUser)
Returns true if the user has the specified permission on the target space.
|
boolean |
permissionExists(SpacePermission permission)
Check whether the given SpacePermission exists.
|
void |
removeAllPermissions(Space space)
|
void |
removeAllPermissionsForGroup(String group)
Deprecated.
|
void |
removeAllUserPermissions(ConfluenceUser user)
|
void |
removeAllUserPermissions(String username)
|
void |
removeGlobalPermissionForUser(ConfluenceUser user,
String permissionType)
|
void |
removePermission(SpacePermission permission)
Deprecated.
|
savePermission
@Deprecated void removeAllPermissions(Space space)
SpacePermissionManagerInternal.removeAllPermissions(com.atlassian.confluence.spaces.Space, com.atlassian.confluence.internal.security.SpacePermissionContext)
instead.space
- The space to remove the permissions for@Deprecated void removePermission(SpacePermission permission)
SpacePermissionManagerInternal.removePermission(SpacePermission, com.atlassian.confluence.internal.security.SpacePermissionContext)
instead.SpacePermissionRemoveEvent
in the process.permission
- the permission to removeboolean hasPermission(String permissionType, @Nullable Space space, @Nullable com.atlassian.user.User remoteUser)
Unless you're writing code that is part of the permission checking implementation, or you're changing space permissions,
you should be using PermissionManager
instead.
permissionType
- The permission type to look upspace
- The space the permission applies to (can be null for global permissions)remoteUser
- The user to look up (can be null for the anonymous user)boolean hasPermissionNoExemptions(String permissionType, @Nullable Space space, @Nullable com.atlassian.user.User remoteUser)
hasPermission(String, Space, User)
does.
For parameter and return value information, see hasPermission(String, Space, User)
.
@Deprecated boolean hasPermission(List permissionTypes, @Nullable Space space, @Nullable com.atlassian.user.User remoteUser)
hasAllPermissions(java.util.List, com.atlassian.confluence.spaces.Space, com.atlassian.user.User)
If remoteUser lacks any of the given permissions, false is returned.
Unless you're writing code that is part of the permission checking implementation, or you're changing space permissions,
you should be using PermissionManager
instead.
permissionTypes
- A List of permission types (see SpacePermission) to checkspace
- The space the permissions apply toremoteUser
- The user to look upboolean hasAllPermissions(List<String> permissionTypes, @Nullable Space space, @Nullable com.atlassian.user.User user)
If remoteUser lacks any of the given permissions, false is returned.
Unless you're writing code that is part of the permission checking implementation, or you're changing space permissions,
you should be using PermissionManager
instead.
permissionTypes
- A List of permission types (see SpacePermission) to checkspace
- The space the permissions apply touser
- The user to look up@Deprecated void removeAllUserPermissions(ConfluenceUser user)
SpacePermissionManagerInternal.removeAllUserPermissions(com.atlassian.confluence.user.ConfluenceUser, com.atlassian.confluence.internal.security.SpacePermissionContext)
instead.SpacePermissionsRemoveForUserEvent
in the process.@Deprecated void removeAllUserPermissions(String username)
@Deprecated void removeGlobalPermissionForUser(ConfluenceUser user, String permissionType)
SpacePermissionManagerInternal.removeGlobalPermissionForUser(com.atlassian.confluence.user.ConfluenceUser, String, com.atlassian.confluence.internal.security.SpacePermissionContext)
instead.SpacePermissionsRemoveForUserEvent
in the process.user
- the user to look uppermissionType
- the permission type to remove@Deprecated void removeAllPermissionsForGroup(String group)
SpacePermissionManagerInternal.removeAllPermissionsForGroup(String, com.atlassian.confluence.internal.security.SpacePermissionContext)
instead.SpacePermissionsRemoveForGroupEvent
in the process.group
- the group to removeList<SpacePermission> getAllPermissionsForGroup(String group)
List<SpacePermission> getGlobalPermissions()
List<SpacePermission> getGlobalPermissions(String permissionType)
void flushCaches()
boolean groupHasPermission(String permissionType, @Nullable Space space, String group)
If a null space is specified, this method looks up matching global permissions, otherwise space's permissions list is queried to see if the permission matches.
Similarly, if permissionType is not a space permission, a matching global permission is looked up.
group
- The group to look up the permission forspace
- The space the permission applies to (can be null for global permissions)permissionType
- The permission type to look up@Deprecated void createInitialSpacePermissions(Space space)
createDefaultSpacePermissions(com.atlassian.confluence.spaces.Space)
or createPrivateSpacePermissions(com.atlassian.confluence.spaces.Space)
instead.SpacePermission.GENERIC_SPACE_PERMISSIONS
) in the specified space.void createDefaultSpacePermissions(Space space)
void createPrivateSpacePermissions(Space space)
boolean hasPermissionForSpace(@Nullable com.atlassian.user.User user, List permissionTypes, @Nullable Space space)
Collection<com.atlassian.user.Group> getGroupsWithPermissions(@Nullable Space space)
space
- - space to query, if null global permissions returnedMap<String,Long> getGroupsForPermissionType(String permissionType, Space space)
Collection<com.atlassian.user.User> getUsersWithPermissions(@Nullable Space space)
space
- - space to query, if null global permissions returnedMap<String,Long> getUsersForPermissionType(String permissionType, Space space)
boolean permissionExists(SpacePermission permission)
permission
- the permission to look for.Set<SpacePermission> getDefaultGlobalPermissions()
By default, confluence-administrators group has admin access, the default confluence users group can view the system and anonymous access is disabled.
SpacePermission
s.Copyright © 2003–2017 Atlassian. All rights reserved.