Interface PermissionsResource
- All Known Implementing Classes:
DeploymentProjectPermissionsResource
,EnvironmentPermissionsResource
,GlobalPermissionsResource
,PlanPermissionsResource
,ProjectPermissionsResource
,ProjectPlanPermissionsResource
,RepositoryPermissionsResource
public interface PermissionsResource
Defines common API for permissions resources
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
addPermissionsForGroup
(String key, 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 key, 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 key, 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 addedgetAvailableGroups
(String key, 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 key, String nameFilter, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) Returns a paged list of usersRestUser
for which no permissions was defined.listGroupPermissions
(String key, String nameFilter, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) Returns a paged list of groupsRestGroupPermission
with non empty permissionslistRolePermissions
(String key, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) Returns a paged list of rolesRestRolePermission
with non empty permissionslistUserPermissions
(String key, String nameFilter, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) Returns a paged list of usersRestUserPermission
with non empty permissionsjavax.ws.rs.core.Response
removePermissionsForGroup
(String key, 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 key, 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 key, 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 present
-
Field Details
-
ROLE_ANONYMOUS
- See Also:
-
ROLE_LOGGED_IN
- See Also:
-
-
Method Details
-
listUserPermissions
RestPageModel<RestUserPermission> listUserPermissions(String key, String nameFilter, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) Returns a paged list of usersRestUserPermission
with non empty permissions -
addPermissionsForUser
javax.ws.rs.core.Response addPermissionsForUser(String key, 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 added -
removePermissionsForUser
javax.ws.rs.core.Response removePermissionsForUser(String key, 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 present -
getAvailableUsers
RestPageModel<RestUser> getAvailableUsers(String key, String nameFilter, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) Returns a paged list of usersRestUser
for which no permissions was defined. Allows to filter by user name -
listGroupPermissions
RestPageModel<RestGroupPermission> listGroupPermissions(String key, String nameFilter, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) Returns a paged list of groupsRestGroupPermission
with non empty permissions -
addPermissionsForGroup
javax.ws.rs.core.Response addPermissionsForGroup(String key, 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 added -
removePermissionsForGroup
javax.ws.rs.core.Response removePermissionsForGroup(String key, 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 present -
getAvailableGroups
RestPageModel<RestGroup> getAvailableGroups(String key, String nameFilter, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) Returns a paged list of groupsRestGroup
for which no permissions was defined. Allows to filter by group name -
listRolePermissions
RestPageModel<RestRolePermission> listRolePermissions(String key, PageRequest pageRequest, ExpansionParam expansion, javax.ws.rs.core.UriInfo uriInfo) Returns a paged list of rolesRestRolePermission
with non empty permissions -
addPermissionsForRole
javax.ws.rs.core.Response addPermissionsForRole(String key, 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 added -
removePermissionsForRole
javax.ws.rs.core.Response removePermissionsForRole(String key, 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 present
-