public class ProjectPermissionsResource extends Object implements PermissionsResource
ROLE_ANONYMOUS, ROLE_LOGGED_IN
Modifier and Type | Method and Description |
---|---|
boolean |
addAnonymousPermissions(String key) |
boolean |
addGroupPermissions(String projectKey,
String group,
List<BambooPermission> permissionsToAdd) |
boolean |
addLoggedInPermissions(String projectKey,
List<BambooPermission> permissionsToAdd) |
javax.ws.rs.core.Response |
addPermissionsForGroup(String projectKey,
String group,
List<String> permissionsToAdd)
Adds given permissions to group
Returns status code 204
Response.Status#NO_CONTENT if any permission was added or
status code 304 Response.Status#NOT_MODIFIED if given permissions were already added |
javax.ws.rs.core.Response |
addPermissionsForRole(String projectKey,
String role,
List<String> permissionsToAdd)
Adds given permissions to role
Returns status code 204
Response.Status#NO_CONTENT if any permission was added or
status code 304 Response.Status#NOT_MODIFIED if all permissions were already added |
javax.ws.rs.core.Response |
addPermissionsForUser(String projectKey,
String username,
List<String> permissionsToAdd)
Adds given permissions to user
Returns status code 204
Response.Status#NO_CONTENT if any permission was added or
status code 304 Response.Status#NOT_MODIFIED if given permissions were already added |
boolean |
addUserPermissions(String projectKey,
String username,
List<BambooPermission> permissionsToAdd) |
List<BambooPermission> |
getAnonymousPermissions(String projectKey) |
RestPageModel<RestGroup> |
getAvailableGroups(String projectKey,
String nameFilter,
PageRequest pageRequest,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Returns a paged list of groups
RestGroup for which no permissions was defined. |
RestPageModel<RestUser> |
getAvailableUsers(String projectKey,
String nameFilter,
PageRequest pageRequest,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Returns a paged list of users
RestUser for which no permissions was defined. |
List<BambooPermission> |
getGroupPermissions(String projectKey,
String group) |
List<BambooPermission> |
getLoggedInPermissions(String projectKey) |
List<BambooPermission> |
getUserPermissions(String projectKey,
String username) |
boolean |
isPermissionVisible(@NotNull BambooPermission permission) |
RestPageModel<RestGroupPermission> |
listGroupPermissions(String projectKey,
String nameFilter,
PageRequest pageRequest,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Returns a paged list of groups
RestGroupPermission with non empty permissions |
Iterable<String> |
listGroupsWithPermissions(String projectKey) |
RestPageModel<RestRolePermission> |
listRolePermissions(String projectKey,
PageRequest pageRequest,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Returns a paged list of roles
RestRolePermission with non empty permissions |
RestPageModel<RestUserPermission> |
listUserPermissions(String projectKey,
String nameFilter,
PageRequest pageRequest,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Returns a paged list of users
RestUserPermission with non empty permissions |
Iterable<String> |
listUsersWithPermissions(String projectKey) |
Collection<BambooPermission> |
permissionDependencies(@NotNull BambooPermission permission) |
boolean |
removeAnonymousPermissions(String key) |
boolean |
removeGroupPermissions(String projectKey,
String group,
List<BambooPermission> permissionsToRemove) |
boolean |
removeLoggedInPermissions(String projectKey,
List<BambooPermission> permissionsToRemove) |
javax.ws.rs.core.Response |
removePermissionsForGroup(String projectKey,
String group,
List<String> permissionsToRemove)
Removes given permissions from group
Returns status code 204
Response.Status#NO_CONTENT if any permission was removed or
status code 304 Response.Status#NOT_MODIFIED if given permissions were not present |
javax.ws.rs.core.Response |
removePermissionsForRole(String projectKey,
String role,
List<String> permissionsToRemove)
Removes given permissions from role
Returns status code 204
Response.Status#NO_CONTENT if any permission was removed or
status code 304 Response.Status#NOT_MODIFIED if given permissions were not present |
javax.ws.rs.core.Response |
removePermissionsForUser(String projectKey,
String username,
List<String> permissionsToRemove)
Removes given permissions from user
Returns status code 204
Response.Status#NO_CONTENT if any permission was removed or
status code 304 Response.Status#NOT_MODIFIED if given permissions were not present |
boolean |
removeUserPermissions(String projectKey,
String username,
List<BambooPermission> permissionsToRemove) |
Collection<BambooPermission> |
supportedPermissions() |
Set<String> |
supportedRoles() |
public RestPageModel<RestUserPermission> listUserPermissions(String projectKey, String nameFilter, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
PermissionsResource
RestUserPermission
with non empty permissionslistUserPermissions
in interface PermissionsResource
public javax.ws.rs.core.Response addPermissionsForUser(String projectKey, String username, List<String> permissionsToAdd)
PermissionsResource
Response.Status#NO_CONTENT
if any permission was added or
status code 304 Response.Status#NOT_MODIFIED
if given permissions were already addedaddPermissionsForUser
in interface PermissionsResource
public javax.ws.rs.core.Response removePermissionsForUser(String projectKey, String username, List<String> permissionsToRemove)
PermissionsResource
Response.Status#NO_CONTENT
if any permission was removed or
status code 304 Response.Status#NOT_MODIFIED
if given permissions were not presentremovePermissionsForUser
in interface PermissionsResource
public RestPageModel<RestUser> getAvailableUsers(String projectKey, String nameFilter, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
PermissionsResource
RestUser
for which no permissions was defined.
Allows to filter by user namegetAvailableUsers
in interface PermissionsResource
public RestPageModel<RestGroupPermission> listGroupPermissions(String projectKey, String nameFilter, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
PermissionsResource
RestGroupPermission
with non empty permissionslistGroupPermissions
in interface PermissionsResource
public javax.ws.rs.core.Response addPermissionsForGroup(String projectKey, String group, List<String> permissionsToAdd)
PermissionsResource
Response.Status#NO_CONTENT
if any permission was added or
status code 304 Response.Status#NOT_MODIFIED
if given permissions were already addedaddPermissionsForGroup
in interface PermissionsResource
public javax.ws.rs.core.Response removePermissionsForGroup(String projectKey, String group, List<String> permissionsToRemove)
PermissionsResource
Response.Status#NO_CONTENT
if any permission was removed or
status code 304 Response.Status#NOT_MODIFIED
if given permissions were not presentremovePermissionsForGroup
in interface PermissionsResource
public RestPageModel<RestGroup> getAvailableGroups(String projectKey, String nameFilter, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
PermissionsResource
RestGroup
for which no permissions was defined.
Allows to filter by group namegetAvailableGroups
in interface PermissionsResource
public RestPageModel<RestRolePermission> listRolePermissions(String projectKey, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
PermissionsResource
RestRolePermission
with non empty permissionslistRolePermissions
in interface PermissionsResource
public javax.ws.rs.core.Response addPermissionsForRole(String projectKey, String role, List<String> permissionsToAdd)
PermissionsResource
Response.Status#NO_CONTENT
if any permission was added or
status code 304 Response.Status#NOT_MODIFIED
if all permissions were already addedaddPermissionsForRole
in interface PermissionsResource
public javax.ws.rs.core.Response removePermissionsForRole(String projectKey, String role, List<String> permissionsToRemove)
PermissionsResource
Response.Status#NO_CONTENT
if any permission was removed or
status code 304 Response.Status#NOT_MODIFIED
if given permissions were not presentremovePermissionsForRole
in interface PermissionsResource
public Collection<BambooPermission> supportedPermissions()
public Collection<BambooPermission> permissionDependencies(@NotNull @NotNull BambooPermission permission)
public List<BambooPermission> getUserPermissions(String projectKey, String username)
public boolean addUserPermissions(String projectKey, String username, List<BambooPermission> permissionsToAdd)
public boolean removeUserPermissions(String projectKey, String username, List<BambooPermission> permissionsToRemove)
public List<BambooPermission> getGroupPermissions(String projectKey, String group)
public boolean addGroupPermissions(String projectKey, String group, List<BambooPermission> permissionsToAdd)
public boolean removeGroupPermissions(String projectKey, String group, List<BambooPermission> permissionsToRemove)
public List<BambooPermission> getLoggedInPermissions(String projectKey)
public boolean addLoggedInPermissions(String projectKey, List<BambooPermission> permissionsToAdd)
public boolean removeLoggedInPermissions(String projectKey, List<BambooPermission> permissionsToRemove)
public List<BambooPermission> getAnonymousPermissions(String projectKey)
public boolean addAnonymousPermissions(String key)
public boolean removeAnonymousPermissions(String key)
public boolean isPermissionVisible(@NotNull @NotNull BambooPermission permission)
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.