public class RepositoryPermissionsResource extends Object implements PermissionsResource
ROLE_ANONYMOUS, ROLE_LOGGED_IN
Modifier and Type | Method and Description |
---|---|
boolean |
addAnonymousPermissions(String key) |
boolean |
addGroupPermissions(String id,
String group,
List<BambooPermission> permissionsToAdd) |
boolean |
addLoggedInPermissions(String id,
List<BambooPermission> permissionsToAdd) |
javax.ws.rs.core.Response |
addPermissionsForGroup(String id,
String group,
List<String> permissionsToAdd)
Grants repository permissions to a given group.
|
javax.ws.rs.core.Response |
addPermissionsForRole(String id,
String role,
List<String> permissionsToAdd)
Grants repository permissions to a given role.
|
javax.ws.rs.core.Response |
addPermissionsForUser(String id,
String username,
List<String> permissionsToAdd)
Grants repository permissions to a given user.
|
boolean |
addUserPermissions(String id,
String username,
List<BambooPermission> permissionsToAdd) |
List<BambooPermission> |
getAnonymousPermissions(String projectKey) |
RestPageModel<RestGroup> |
getAvailableGroups(String id,
String nameFilter,
PageRequest pageRequest,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Returns list of groups which weren't granted explicitly any repository permissions.
|
RestPageModel<RestUser> |
getAvailableUsers(String id,
String nameFilter,
PageRequest pageRequest,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Returns list of users which weren't granted explicitly any repository permissions.
|
List<BambooPermission> |
getGroupPermissions(String id,
String group) |
List<BambooPermission> |
getLoggedInPermissions(String id) |
List<BambooPermission> |
getUserPermissions(String id,
String username) |
RestPageModel<RestGroupPermission> |
listGroupPermissions(String id,
String nameFilter,
PageRequest pageRequest,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Retrieve a list of groups with their repository permissions.
|
Iterable<String> |
listGroupsWithPermissions(String id) |
RestPageModel<RestRolePermission> |
listRolePermissions(String id,
PageRequest pageRequest,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Retrieve a list of roles with their repository permissions.
|
RestPageModel<RestUserPermission> |
listUserPermissions(String id,
String nameFilter,
PageRequest pageRequest,
Expansion expansion,
javax.ws.rs.core.UriInfo uriInfo)
Retrieve a list of users with their explicit permissions to given resource.
|
Iterable<String> |
listUsersWithPermissions(String id) |
boolean |
removeAnonymousPermissions(String key) |
boolean |
removeGroupPermissions(String id,
String group,
List<BambooPermission> permissionsToRemove) |
boolean |
removeLoggedInPermissions(String id,
List<BambooPermission> permissionsToRemove) |
javax.ws.rs.core.Response |
removePermissionsForGroup(String id,
String group,
List<String> permissionsToRemove)
Revokes repository permissions from a given group.
|
javax.ws.rs.core.Response |
removePermissionsForRole(String id,
String role,
List<String> permissionsToRemove)
Revokes repository permissions from a given role.
|
javax.ws.rs.core.Response |
removePermissionsForUser(String id,
String username,
List<String> permissionsToRemove)
Revokes repository permissions from a given user.
|
boolean |
removeUserPermissions(String id,
String username,
List<BambooPermission> permissionsToRemove) |
Collection<BambooPermission> |
supportedPermissions() |
Set<String> |
supportedRoles() |
public RestPageModel<RestUserPermission> listUserPermissions(String id, String nameFilter, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
listUserPermissions
in interface PermissionsResource
id
- repository entity keynameFilter
- user filter, filter is case insensitive matches: username, user's full name, user's emailpageRequest
- represents the params that define which page the request is afterexpansion
- ignoreduriInfo
- ignoredpublic javax.ws.rs.core.Response addPermissionsForUser(String id, String username, @RequestBody List<String> permissionsToAdd)
addPermissionsForUser
in interface PermissionsResource
id
- repository entity keyusername
- username of the affected userpermissionsToAdd
- permission names to grantpublic javax.ws.rs.core.Response removePermissionsForUser(String id, String username, @RequestBody List<String> permissionsToRemove)
removePermissionsForUser
in interface PermissionsResource
id
- repository entity keyusername
- username of the affected userpermissionsToRemove
- permission names to be revokedpublic RestPageModel<RestUser> getAvailableUsers(String id, String nameFilter, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
getAvailableUsers
in interface PermissionsResource
id
- repository entity keynameFilter
- user filter, filter is case insensitive matches: username, user's full name, user's emailpageRequest
- represents the params that define which page the request is afterexpansion
- ignoreduriInfo
- ignoredpublic RestPageModel<RestGroupPermission> listGroupPermissions(String id, String nameFilter, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
listGroupPermissions
in interface PermissionsResource
id
- repository entity keynameFilter
- group name filter, filter is case insensitive matches group namepageRequest
- represents the params that define which page the request is afterexpansion
- ignoreduriInfo
- ignoredpublic javax.ws.rs.core.Response addPermissionsForGroup(String id, String group, @RequestBody List<String> permissionsToAdd)
addPermissionsForGroup
in interface PermissionsResource
id
- repository entity keygroup
- affected grouppermissionsToAdd
- permission names to grantpublic javax.ws.rs.core.Response removePermissionsForGroup(String id, String group, @RequestBody List<String> permissionsToRemove)
removePermissionsForGroup
in interface PermissionsResource
id
- repository entity keygroup
- affected grouppermissionsToRemove
- permission names to be revokedpublic RestPageModel<RestGroup> getAvailableGroups(String id, String nameFilter, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
getAvailableGroups
in interface PermissionsResource
id
- repository entity keynameFilter
- group name filter, filter is case insensitive matches group namepageRequest
- represents the params that define which page the request is afterexpansion
- ignoreduriInfo
- ignoredpublic RestPageModel<RestRolePermission> listRolePermissions(String id, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
listRolePermissions
in interface PermissionsResource
id
- repository entity keypageRequest
- represents the params that define which page the request is afterexpansion
- ignoreduriInfo
- ignoredpublic javax.ws.rs.core.Response addPermissionsForRole(String id, String role, @RequestBody List<String> permissionsToAdd)
addPermissionsForRole
in interface PermissionsResource
id
- repository entity keyrole
- affected rolepermissionsToAdd
- permission names to grantpublic javax.ws.rs.core.Response removePermissionsForRole(String id, String role, @RequestBody List<String> permissionsToRemove)
removePermissionsForRole
in interface PermissionsResource
id
- repository entity keyrole
- affected rolepermissionsToRemove
- permission names to be revokedpublic Collection<BambooPermission> supportedPermissions()
public List<BambooPermission> getUserPermissions(String id, String username)
public boolean addUserPermissions(String id, String username, List<BambooPermission> permissionsToAdd)
public boolean removeUserPermissions(String id, String username, List<BambooPermission> permissionsToRemove)
public List<BambooPermission> getGroupPermissions(String id, String group)
public boolean addGroupPermissions(String id, String group, List<BambooPermission> permissionsToAdd)
public boolean removeGroupPermissions(String id, String group, List<BambooPermission> permissionsToRemove)
public List<BambooPermission> getLoggedInPermissions(String id)
public boolean addLoggedInPermissions(String id, List<BambooPermission> permissionsToAdd)
public boolean removeLoggedInPermissions(String id, List<BambooPermission> permissionsToRemove)
public List<BambooPermission> getAnonymousPermissions(String projectKey)
public boolean addAnonymousPermissions(String key)
public boolean removeAnonymousPermissions(String key)
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.