public class DefaultPermissionsAdministrator extends Object implements PermissionsAdministrator
Modifier and Type | Class and Description |
---|---|
static class |
DefaultPermissionsAdministrator.GroupPermissionRow |
static class |
DefaultPermissionsAdministrator.UnlicensedPermissionRow
Used for both anonymous and "all authenticated user" permissions categories
|
static class |
DefaultPermissionsAdministrator.UserPermissionRow |
Modifier and Type | Field and Description |
---|---|
protected List<SpacePermission> |
permissions |
protected SpacePermissionManager |
spacePermissionManager |
Modifier | Constructor and Description |
---|---|
protected |
DefaultPermissionsAdministrator(SpacePermissionManager spacePermissionManager,
PermissionResolver permissionResolver) |
Modifier and Type | Method and Description |
---|---|
PermissionRow |
buildAnonymousPermissionRow()
Retrieves the UnlicensedPermissionRow for printing in a UI.
|
Collection<PermissionRow> |
buildGroupPermissionTable(UserAccessor userAccessor)
Builds a map of permissions for each permitted group, for printing in the UI
The key is the groupname and the values is a row of permissions.
|
PermissionRow |
buildUnlicensedAuthenticatedPermissionRow()
Builds the permissions for all authenticated users, for printing in the UI.
|
Collection<PermissionRow> |
buildUserPermissionTable(UserAccessor userAccessor)
Builds a map of permissions for each permitted user, for printing in the UI
The key is the username and the values is a row of permissions.
|
List<SpacePermission> |
getPermissions()
Returns the current permissions set for the entity
|
void |
resetPermissions() |
protected final SpacePermissionManager spacePermissionManager
protected List<SpacePermission> permissions
protected DefaultPermissionsAdministrator(SpacePermissionManager spacePermissionManager, PermissionResolver permissionResolver)
public Collection<PermissionRow> buildUserPermissionTable(UserAccessor userAccessor)
buildUserPermissionTable
in interface PermissionsAdministrator
userAccessor
- - used to find and verify the usernames.public Collection<PermissionRow> buildGroupPermissionTable(UserAccessor userAccessor)
buildGroupPermissionTable
in interface PermissionsAdministrator
userAccessor
- - used to find and verify the groupnames.public PermissionRow buildUnlicensedAuthenticatedPermissionRow()
PermissionsAdministrator
buildUnlicensedAuthenticatedPermissionRow
in interface PermissionsAdministrator
public PermissionRow buildAnonymousPermissionRow()
buildAnonymousPermissionRow
in interface PermissionsAdministrator
public List<SpacePermission> getPermissions()
PermissionsAdministrator
getPermissions
in interface PermissionsAdministrator
public void resetPermissions()
Copyright © 2003–2016 Atlassian. All rights reserved.