Class DeploymentProjectPermissionsResource
- java.lang.Object
-
- com.atlassian.bamboo.plugins.rest.permission.DeploymentProjectPermissionsResource
-
- All Implemented Interfaces:
PermissionsResource
public class DeploymentProjectPermissionsResource extends Object implements PermissionsResource
REST endpoint to manage user/group deployment project permissions in Bamboo.- Since:
- 6.2
-
-
Field Summary
-
Fields inherited from interface com.atlassian.bamboo.plugins.rest.permission.PermissionsResource
ROLE_ANONYMOUS, ROLE_LOGGED_IN
-
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description boolean
addAnonymousPermissions(String id)
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)
Adds given permissions to group Returns status code 204Response.Status.NO_CONTENT
if any permission was added or status code 304Response.Status.NOT_MODIFIED
if given permissions were already addedjavax.ws.rs.core.Response
addPermissionsForRole(String id, String role, List<String> permissionsToAdd)
Adds given permissions to role Returns status code 204Response.Status.NO_CONTENT
if any permission was added or status code 304Response.Status.NOT_MODIFIED
if all permissions were already addedjavax.ws.rs.core.Response
addPermissionsForUser(String id, String username, List<String> permissionsToAdd)
Adds given permissions to user Returns status code 204Response.Status.NO_CONTENT
if any permission was added or status code 304Response.Status.NOT_MODIFIED
if given permissions were already addedboolean
addUserPermissions(String id, String username, List<BambooPermission> permissionsToAdd)
List<BambooPermission>
getAnonymousPermissions(String id)
RestPageModel<RestGroup>
getAvailableGroups(String id, String nameFilter, PageRequest pageRequest, Expansion expansion, javax.ws.rs.core.UriInfo uriInfo)
Returns a paged list of groupsRestGroup
for which no permissions was defined.RestPageModel<RestUser>
getAvailableUsers(String id, String nameFilter, PageRequest pageRequest, Expansion expansion, javax.ws.rs.core.UriInfo uriInfo)
Returns a paged list of usersRestUser
for which no permissions was defined.List<BambooPermission>
getGroupPermissions(String id, String group)
List<BambooPermission>
getLoggedInPermissions(String id)
List<BambooPermission>
getUserPermissions(String id, String username)
default boolean
isPermissionVisible(@NotNull BambooPermission permission)
RestPageModel<RestGroupPermission>
listGroupPermissions(String id, String nameFilter, PageRequest pageRequest, Expansion expansion, javax.ws.rs.core.UriInfo uriInfo)
Returns a paged list of groupsRestGroupPermission
with non empty permissionsIterable<String>
listGroupsWithPermissions(String id)
RestPageModel<RestRolePermission>
listRolePermissions(String id, PageRequest pageRequest, Expansion expansion, javax.ws.rs.core.UriInfo uriInfo)
Returns a paged list of rolesRestRolePermission
with non empty permissionsRestPageModel<RestUserPermission>
listUserPermissions(String id, String name, PageRequest pageRequest, Expansion expansion, javax.ws.rs.core.UriInfo uriInfo)
Returns a paged list of usersRestUserPermission
with non empty permissionsIterable<String>
listUsersWithPermissions(String id)
Collection<BambooPermission>
permissionDependencies(@NotNull BambooPermission permission)
boolean
removeAnonymousPermissions(String id)
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)
Removes given permissions from group Returns status code 204Response.Status.NO_CONTENT
if any permission was removed or status code 304Response.Status.NOT_MODIFIED
if given permissions were not presentjavax.ws.rs.core.Response
removePermissionsForRole(String id, String role, List<String> permissionsToRemove)
Removes given permissions from role Returns status code 204Response.Status.NO_CONTENT
if any permission was removed or status code 304Response.Status.NOT_MODIFIED
if given permissions were not presentjavax.ws.rs.core.Response
removePermissionsForUser(String id, String username, List<String> permissionsToRemove)
Removes given permissions from user Returns status code 204Response.Status.NO_CONTENT
if any permission was removed or status code 304Response.Status.NOT_MODIFIED
if given permissions were not presentboolean
removeUserPermissions(String id, String username, List<BambooPermission> permissionsToRemove)
Collection<BambooPermission>
supportedPermissions()
Set<String>
supportedRoles()
-
-
-
Method Detail
-
listUserPermissions
public RestPageModel<RestUserPermission> listUserPermissions(String id, String name, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
Description copied from interface:PermissionsResource
Returns a paged list of usersRestUserPermission
with non empty permissions- Specified by:
listUserPermissions
in interfacePermissionsResource
-
addPermissionsForUser
public javax.ws.rs.core.Response addPermissionsForUser(String id, String username, List<String> permissionsToAdd)
Description copied from interface:PermissionsResource
Adds given permissions to user Returns status code 204Response.Status.NO_CONTENT
if any permission was added or status code 304Response.Status.NOT_MODIFIED
if given permissions were already added- Specified by:
addPermissionsForUser
in interfacePermissionsResource
-
removePermissionsForUser
public javax.ws.rs.core.Response removePermissionsForUser(String id, String username, List<String> permissionsToRemove)
Description copied from interface:PermissionsResource
Removes given permissions from user Returns status code 204Response.Status.NO_CONTENT
if any permission was removed or status code 304Response.Status.NOT_MODIFIED
if given permissions were not present- Specified by:
removePermissionsForUser
in interfacePermissionsResource
-
getAvailableUsers
public RestPageModel<RestUser> getAvailableUsers(String id, String nameFilter, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
Description copied from interface:PermissionsResource
Returns a paged list of usersRestUser
for which no permissions was defined. Allows to filter by user name- Specified by:
getAvailableUsers
in interfacePermissionsResource
-
listGroupPermissions
public RestPageModel<RestGroupPermission> listGroupPermissions(String id, String nameFilter, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
Description copied from interface:PermissionsResource
Returns a paged list of groupsRestGroupPermission
with non empty permissions- Specified by:
listGroupPermissions
in interfacePermissionsResource
-
addPermissionsForGroup
public javax.ws.rs.core.Response addPermissionsForGroup(String id, String group, List<String> permissionsToAdd)
Description copied from interface:PermissionsResource
Adds given permissions to group Returns status code 204Response.Status.NO_CONTENT
if any permission was added or status code 304Response.Status.NOT_MODIFIED
if given permissions were already added- Specified by:
addPermissionsForGroup
in interfacePermissionsResource
-
removePermissionsForGroup
public javax.ws.rs.core.Response removePermissionsForGroup(String id, String group, List<String> permissionsToRemove)
Description copied from interface:PermissionsResource
Removes given permissions from group Returns status code 204Response.Status.NO_CONTENT
if any permission was removed or status code 304Response.Status.NOT_MODIFIED
if given permissions were not present- Specified by:
removePermissionsForGroup
in interfacePermissionsResource
-
getAvailableGroups
public RestPageModel<RestGroup> getAvailableGroups(String id, String nameFilter, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
Description copied from interface:PermissionsResource
Returns a paged list of groupsRestGroup
for which no permissions was defined. Allows to filter by group name- Specified by:
getAvailableGroups
in interfacePermissionsResource
-
listRolePermissions
public RestPageModel<RestRolePermission> listRolePermissions(String id, @Context PageRequest pageRequest, @Context Expansion expansion, @Context javax.ws.rs.core.UriInfo uriInfo)
Description copied from interface:PermissionsResource
Returns a paged list of rolesRestRolePermission
with non empty permissions- Specified by:
listRolePermissions
in interfacePermissionsResource
-
addPermissionsForRole
public javax.ws.rs.core.Response addPermissionsForRole(String id, String role, List<String> permissionsToAdd)
Description copied from interface:PermissionsResource
Adds given permissions to role Returns status code 204Response.Status.NO_CONTENT
if any permission was added or status code 304Response.Status.NOT_MODIFIED
if all permissions were already added- Specified by:
addPermissionsForRole
in interfacePermissionsResource
-
removePermissionsForRole
public javax.ws.rs.core.Response removePermissionsForRole(String id, String role, List<String> permissionsToRemove)
Description copied from interface:PermissionsResource
Removes given permissions from role Returns status code 204Response.Status.NO_CONTENT
if any permission was removed or status code 304Response.Status.NOT_MODIFIED
if given permissions were not present- Specified by:
removePermissionsForRole
in interfacePermissionsResource
-
supportedPermissions
public Collection<BambooPermission> supportedPermissions()
-
permissionDependencies
public Collection<BambooPermission> permissionDependencies(@NotNull @NotNull BambooPermission permission)
-
getUserPermissions
public List<BambooPermission> getUserPermissions(String id, String username)
-
addUserPermissions
public boolean addUserPermissions(String id, String username, List<BambooPermission> permissionsToAdd)
-
removeUserPermissions
public boolean removeUserPermissions(String id, String username, List<BambooPermission> permissionsToRemove)
-
getGroupPermissions
public List<BambooPermission> getGroupPermissions(String id, String group)
-
addGroupPermissions
public boolean addGroupPermissions(String id, String group, List<BambooPermission> permissionsToAdd)
-
removeGroupPermissions
public boolean removeGroupPermissions(String id, String group, List<BambooPermission> permissionsToRemove)
-
getLoggedInPermissions
public List<BambooPermission> getLoggedInPermissions(String id)
-
addLoggedInPermissions
public boolean addLoggedInPermissions(String id, List<BambooPermission> permissionsToAdd)
-
removeLoggedInPermissions
public boolean removeLoggedInPermissions(String id, List<BambooPermission> permissionsToRemove)
-
getAnonymousPermissions
public List<BambooPermission> getAnonymousPermissions(String id)
-
addAnonymousPermissions
public boolean addAnonymousPermissions(String id)
-
removeAnonymousPermissions
public boolean removeAnonymousPermissions(String id)
-
isPermissionVisible
public default boolean isPermissionVisible(@NotNull @NotNull BambooPermission permission)
-
-