Class GlobalPermissionsResource
java.lang.Object
com.atlassian.bamboo.plugins.rest.permission.GlobalPermissionsResource
- All Implemented Interfaces:
PermissionsResource
@Path("permissions/global")
@Produces("application/json")
@Consumes("application/json")
public class GlobalPermissionsResource
extends Object
implements PermissionsResource
REST endpoint to manage user/group global 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
Modifier and TypeMethodDescriptionboolean
boolean
addGroupPermissions
(String ignore, String group, List<BambooPermission> permissionsToAdd) boolean
addLoggedInPermissions
(String ignore, List<BambooPermission> permissionsToAdd) javax.ws.rs.core.Response
addPermissionsForGroup
(String ignore, 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 ignore, 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 ignore, 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 ignore, String username, List<BambooPermission> permissionsToAdd) getAvailableGroups
(String ignore, String nameFilter, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) Returns a paged list of groupsRestGroup
for which no permissions was defined.getAvailableUsers
(String ignore, String nameFilter, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) Returns a paged list of usersRestUser
for which no permissions was defined.getGroupPermissions
(String ignore, String group) getLoggedInPermissions
(String ignore) getUserPermissions
(String ignore, String username) default boolean
isPermissionVisible
(@NotNull BambooPermission permission) listGroupPermissions
(String ignore, String nameFilter, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) Returns a paged list of groupsRestGroupPermission
with non empty permissionslistGroupsWithPermissions
(String ignore) listRolePermissions
(String ignore, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) Returns a paged list of rolesRestRolePermission
with non empty permissionslistUserPermissions
(String ignore, String nameFilter, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) Returns a paged list of usersRestUserPermission
with non empty permissionslistUsersWithPermissions
(String ignore) permissionDependencies
(@NotNull BambooPermission permission) boolean
boolean
removeGroupPermissions
(String ignore, String group, List<BambooPermission> permissionsToRemove) boolean
removeLoggedInPermissions
(String ignore, List<BambooPermission> permissionsToRemove) javax.ws.rs.core.Response
removePermissionsForGroup
(String ignore, 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 ignore, 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 ignore, 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 ignore, String username, List<BambooPermission> permissionsToRemove)
-
Method Details
-
listUserPermissions
@GET @Path("users") public RestPageModel<RestUserPermission> listUserPermissions(@QueryParam("ignore") String ignore, @QueryParam("name") String nameFilter, @BeanParam PageRequest pageRequest, @BeanParam ExpansionParam 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
@PUT @Path("users/{name : (.+)?}") public javax.ws.rs.core.Response addPermissionsForUser(@QueryParam("ignore") String ignore, @PathParam("name") 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
@DELETE @Path("users/{name : (.+)?}") public javax.ws.rs.core.Response removePermissionsForUser(@QueryParam("ignore") String ignore, @PathParam("name") 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
@GET @Path("available-users") public RestPageModel<RestUser> getAvailableUsers(@QueryParam("ignore") String ignore, @QueryParam("name") String nameFilter, @BeanParam PageRequest pageRequest, @BeanParam ExpansionParam 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
@GET @Path("groups") public RestPageModel<RestGroupPermission> listGroupPermissions(@QueryParam("ignore") String ignore, @QueryParam("name") String nameFilter, @BeanParam PageRequest pageRequest, @BeanParam ExpansionParam 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
@PUT @Path("groups/{name : (.+)?}") public javax.ws.rs.core.Response addPermissionsForGroup(@QueryParam("ignore") String ignore, @PathParam("name") 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
@DELETE @Path("groups/{name : (.+)?}") public javax.ws.rs.core.Response removePermissionsForGroup(@QueryParam("ignore") String ignore, @PathParam("name") 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
@GET @Path("available-groups") public RestPageModel<RestGroup> getAvailableGroups(@QueryParam("ignore") String ignore, @QueryParam("name") String nameFilter, @BeanParam PageRequest pageRequest, @BeanParam ExpansionParam 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
@GET @Path("roles") public RestPageModel<RestRolePermission> listRolePermissions(@QueryParam("ignore") String ignore, @BeanParam PageRequest pageRequest, @BeanParam ExpansionParam 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
@PUT @Path("roles/{name : (.+)?}") public javax.ws.rs.core.Response addPermissionsForRole(@QueryParam("ignore") String ignore, @PathParam("name") 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
@DELETE @Path("roles/{name : (.+)?}") public javax.ws.rs.core.Response removePermissionsForRole(@QueryParam("ignore") String ignore, @PathParam("name") 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
-
supportedRoles
-
supportedPermissions
-
permissionDependencies
public Collection<BambooPermission> permissionDependencies(@NotNull @NotNull BambooPermission permission) -
listUsersWithPermissions
-
getUserPermissions
-
addUserPermissions
public boolean addUserPermissions(String ignore, String username, List<BambooPermission> permissionsToAdd) -
removeUserPermissions
public boolean removeUserPermissions(String ignore, String username, List<BambooPermission> permissionsToRemove) -
listGroupsWithPermissions
-
getGroupPermissions
-
addGroupPermissions
public boolean addGroupPermissions(String ignore, String group, List<BambooPermission> permissionsToAdd) -
removeGroupPermissions
public boolean removeGroupPermissions(String ignore, String group, List<BambooPermission> permissionsToRemove) -
getLoggedInPermissions
-
addLoggedInPermissions
-
removeLoggedInPermissions
-
getAnonymousPermissions
-
addAnonymousPermissions
-
removeAnonymousPermissions
-
isPermissionVisible
-