@ParametersAreNonnullByDefault public class ReadOnlySpacePermissionManager extends Object implements SpacePermissionManagerInternal
| Constructor and Description |
|---|
ReadOnlySpacePermissionManager(SpacePermissionManager spacePermissionManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
createDefaultSpacePermissions(Space space) |
void |
createPrivateSpacePermissions(Space space) |
void |
flushCaches() |
List<SpacePermission> |
getAllPermissionsForGroup(String arg0) |
Set<SpacePermission> |
getDefaultGlobalPermissions()
Returns the default global permissions that are created when Confluence is set up.
|
List<SpacePermission> |
getGlobalPermissions() |
List<SpacePermission> |
getGlobalPermissions(String arg0) |
Map<String,Long> |
getGroupsForPermissionType(String arg0,
Space arg1) |
Collection<com.atlassian.user.Group> |
getGroupsWithPermissions(@Nullable Space arg0)
Returns all groups which have permissions in a space or on a global level.
|
Map<String,Long> |
getUsersForPermissionType(String arg0,
Space arg1) |
Collection<com.atlassian.user.User> |
getUsersWithPermissions(@Nullable Space arg0)
Returns a collection of user objects with VIEWSPACE_PERMISSION in the space.
|
boolean |
groupHasPermission(String arg0,
@Nullable Space arg1,
String arg2)
Checks whether the given group has the given permission
|
boolean |
hasAllPermissions(List<String> permissionTypes,
@Nullable Space space,
@Nullable com.atlassian.user.User user)
Determines if remoteUser has all of the given permissions in space
|
boolean |
hasPermission(String arg0,
@Nullable Space arg1,
@Nullable com.atlassian.user.User arg2)
Determines if remoteUser has the given permission in space
|
boolean |
hasPermissionForSpace(@Nullable com.atlassian.user.User arg0,
List arg1,
@Nullable Space arg2) |
boolean |
hasPermissionNoExemptions(String permissionType,
@Nullable Space space,
@Nullable com.atlassian.user.User remoteUser)
Returns true if the user has the specified permission on the target space.
|
boolean |
isPermittedInReadOnlyAccessMode(String permissionType)
Check if the permission type is permitted in read only access mode
|
boolean |
permissionExists(SpacePermission arg0)
Check whether the given SpacePermission exists.
|
void |
removeAllPermissions(Space space)
Deprecated.
|
void |
removeAllPermissions(Space space,
SpacePermissionContext context)
Removes all permissions belonging to space
|
void |
removeAllPermissionsForGroup(String group)
Deprecated.
|
void |
removeAllPermissionsForGroup(String group,
SpacePermissionContext context)
Removes all permissions for the given group.
|
void |
removeAllUserPermissions(@NonNull ConfluenceUser user)
Deprecated.
|
void |
removeAllUserPermissions(ConfluenceUser user,
SpacePermissionContext context)
Removes all permissions for the given user.
|
void |
removeGlobalPermissionForUser(ConfluenceUser user,
String permissionType)
Deprecated.
|
void |
removeGlobalPermissionForUser(ConfluenceUser user,
String permissionType,
SpacePermissionContext context)
Removes global permission of specified type that is directly associated with a user.
|
void |
removePermission(SpacePermission permission)
Deprecated.
|
void |
removePermission(SpacePermission permission,
SpacePermissionContext context)
Removes the given permission.
|
void |
savePermission(SpacePermission permission)
Deprecated.
|
void |
savePermission(SpacePermission permission,
SpacePermissionContext context)
Saves the permission.
|
public ReadOnlySpacePermissionManager(SpacePermissionManager spacePermissionManager)
public void createDefaultSpacePermissions(Space space)
createDefaultSpacePermissions in interface SpacePermissionManagerpublic void createPrivateSpacePermissions(Space space)
createPrivateSpacePermissions in interface SpacePermissionManagerpublic void flushCaches()
flushCaches in interface SpacePermissionManagerpublic List<SpacePermission> getAllPermissionsForGroup(String arg0)
getAllPermissionsForGroup in interface SpacePermissionManagerpublic List<SpacePermission> getGlobalPermissions()
getGlobalPermissions in interface SpacePermissionManagerpublic List<SpacePermission> getGlobalPermissions(String arg0)
getGlobalPermissions in interface SpacePermissionManagerpublic Map<String,Long> getGroupsForPermissionType(String arg0, Space arg1)
getGroupsForPermissionType in interface SpacePermissionManagerpublic Collection<com.atlassian.user.Group> getGroupsWithPermissions(@Nullable Space arg0)
SpacePermissionManagergetGroupsWithPermissions in interface SpacePermissionManagerarg0 - - space to query, if null global permissions returnedpublic Map<String,Long> getUsersForPermissionType(String arg0, Space arg1)
getUsersForPermissionType in interface SpacePermissionManagerpublic Collection<com.atlassian.user.User> getUsersWithPermissions(@Nullable Space arg0)
SpacePermissionManagergetUsersWithPermissions in interface SpacePermissionManagerarg0 - - space to query, if null global permissions returnedpublic boolean groupHasPermission(String arg0, @Nullable Space arg1, String arg2)
SpacePermissionManagerIf 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.
groupHasPermission in interface SpacePermissionManagerarg0 - The permission type to look uparg1 - The space the permission applies to (can be null for global permissions)arg2 - The group to look up the permission forpublic boolean hasPermission(String arg0, @Nullable Space arg1, @Nullable com.atlassian.user.User arg2)
SpacePermissionManager
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.
hasPermission in interface SpacePermissionManagerarg0 - The permission type to look uparg1 - The space the permission applies to (can be null for global permissions)arg2 - The user to look up (can be null for the anonymous user)public boolean hasPermissionNoExemptions(String permissionType, @Nullable Space space, @Nullable com.atlassian.user.User remoteUser)
SpacePermissionManagerSpacePermissionManager.hasPermission(String, Space, User) does.
For parameter and return value information, see SpacePermissionManager.hasPermission(String, Space, User).
hasPermissionNoExemptions in interface SpacePermissionManagerpublic boolean hasAllPermissions(List<String> permissionTypes, @Nullable Space space, @Nullable com.atlassian.user.User user)
SpacePermissionManagerIf 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.
hasAllPermissions in interface SpacePermissionManagerpermissionTypes - A List of permission types (see SpacePermission) to checkspace - The space the permissions apply touser - The user to look uppublic boolean hasPermissionForSpace(@Nullable com.atlassian.user.User arg0,
List arg1,
@Nullable Space arg2)
hasPermissionForSpace in interface SpacePermissionManagerpublic boolean permissionExists(SpacePermission arg0)
SpacePermissionManagerpermissionExists in interface SpacePermissionManagerarg0 - the permission to look for.public Set<SpacePermission> getDefaultGlobalPermissions()
SpacePermissionManagerBy default, confluence-administrators group has admin access, the default confluence users group can view the system and anonymous access is disabled.
getDefaultGlobalPermissions in interface SpacePermissionManagerSpacePermissions.public boolean isPermittedInReadOnlyAccessMode(String permissionType)
SpacePermissionManagerisPermittedInReadOnlyAccessMode in interface SpacePermissionManagerpermissionType - the permission type to be checked@Deprecated public void removeAllPermissions(Space space)
SpacePermissionManagerremoveAllPermissions in interface SpacePermissionManagerspace - The space to remove the permissions forpublic void removeAllPermissions(Space space, SpacePermissionContext context)
SpacePermissionManagerInternalremoveAllPermissions in interface SpacePermissionManagerInternalspace - The space to remove the permissions forcontext - The context for this removal@Deprecated public void removeAllPermissionsForGroup(String group)
SpacePermissionManagerSpacePermissionsRemoveForGroupEvent in the process.removeAllPermissionsForGroup in interface SpacePermissionManagergroup - the group to removepublic void removeAllPermissionsForGroup(String group, SpacePermissionContext context)
SpacePermissionManagerInternal
May generate a SpacePermissionsRemoveForGroupEvent in
the process, depending on the context.
removeAllPermissionsForGroup in interface SpacePermissionManagerInternalgroup - the group to remove@Deprecated public void removeAllUserPermissions(@NonNull ConfluenceUser user)
SpacePermissionManagerSpacePermissionsRemoveForUserEvent in the process.removeAllUserPermissions in interface SpacePermissionManagerpublic void removeAllUserPermissions(ConfluenceUser user, SpacePermissionContext context)
SpacePermissionManagerInternal
May generate a SpacePermissionsRemoveForUserEvent in the
process, depending on the context.
removeAllUserPermissions in interface SpacePermissionManagerInternaluser - the user to remove permissions forcontext - the context for the removal@Deprecated public void removeGlobalPermissionForUser(ConfluenceUser user, String permissionType)
SpacePermissionManagerSpacePermissionsRemoveForUserEvent in the process.removeGlobalPermissionForUser in interface SpacePermissionManageruser - the user to look uppermissionType - the permission type to removepublic void removeGlobalPermissionForUser(ConfluenceUser user, String permissionType, SpacePermissionContext context)
SpacePermissionManagerInternal
May generate a SpacePermissionsRemoveForUserEvent in the
process, depending on the context.
removeGlobalPermissionForUser in interface SpacePermissionManagerInternaluser - the user to look uppermissionType - the permission type to removecontext - the context for the removal@Deprecated public void removePermission(SpacePermission permission)
SpacePermissionManagerSpacePermissionRemoveEvent in the process.removePermission in interface SpacePermissionManagerpermission - the permission to removepublic void removePermission(SpacePermission permission, SpacePermissionContext context)
SpacePermissionManagerInternal
May generate a SpacePermissionRemoveEvent in the process,
depending on the context.
removePermission in interface SpacePermissionManagerInternalpermission - the permission to removecontext - the context for the removal@Deprecated public void savePermission(SpacePermission permission)
SpacePermissionSaverSpacePermissionSaveEvent in the process.savePermission in interface SpacePermissionSaverpublic void savePermission(SpacePermission permission, SpacePermissionContext context)
SpacePermissionSaverInternal
May generate a SpacePermissionSaveEvent in the process,
depending on the context.
savePermission in interface SpacePermissionSaverInternalpermission - the permission to savecontext - the context for the saveCopyright © 2003–2021 Atlassian. All rights reserved.