Class SpacePermissionResource
java.lang.Object
com.atlassian.confluence.plugins.restapi.resources.SpacePermissionResource
@Consumes("application/json")
@Produces("application/json")
@Path("/space/{spaceKey}/permissions")
public class SpacePermissionResource
extends Object
REST API for adding and removing a space permission.
- Since:
- 9.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponsegetAllSpacePermissions(String spaceKey) Get all space permissionsjavax.ws.rs.core.ResponsegetPermissionsGrantedToAnonymousUsers(String spaceKey) Get the permissions granted to an anonymous users in the given space.javax.ws.rs.core.ResponsegetPermissionsGrantedToGroup(String spaceKey, String groupName) javax.ws.rs.core.ResponsegetPermissionsGrantedToUser(String spaceKey, String userKey) Gets the permissions granted to a user in a space.javax.ws.rs.core.ResponsegrantPermissionsToAnonymousUsers(String spaceKey, Set<OperationDescription> permissions) Grant permissions to anonymous user in the given space.javax.ws.rs.core.ResponsegrantPermissionsToGroup(String spaceKey, String groupName, Set<OperationDescription> permissions) Grant permissions to a group in the given space.javax.ws.rs.core.ResponsegrantPermissionsToUser(String spaceKey, String userKey, Set<OperationDescription> permissions) Grant permissions to a user in the given space.javax.ws.rs.core.ResponserevokePermissionsFromAnonymousUser(String spaceKey, Set<OperationDescription> permissions) Revoke permissions from a user in the given space.javax.ws.rs.core.ResponserevokePermissionsFromGroup(String spaceKey, String groupName, Set<OperationDescription> permissions) Revoke permissions from a group in the given space.javax.ws.rs.core.ResponserevokePermissionsFromUser(String spaceKey, String userKey, Set<OperationDescription> permissions) Revoke permissions from a user in the given space.javax.ws.rs.core.ResponsesetPermissions(String spaceKey, Set<SpacePermissionsForSubject> spacePermissionsForSubjects) Sets permissions to multiple users/groups in the given space.
-
Constructor Details
-
SpacePermissionResource
-
-
Method Details
-
getAllSpacePermissions
@GET public javax.ws.rs.core.Response getAllSpacePermissions(@PathParam("spaceKey") String spaceKey) Get all space permissions
- Parameters:
spaceKey- the key of the space- Returns:
- all permissions granted to users and groups in the particular space
-
getPermissionsGrantedToUser
@GET @Path("/user/{userKey}") public javax.ws.rs.core.Response getPermissionsGrantedToUser(@PathParam("spaceKey") String spaceKey, @PathParam("userKey") String userKey) Gets the permissions granted to a user in a space.
- Parameters:
spaceKey- the key of the spaceuserKey- the key of the user to look up
-
getPermissionsGrantedToAnonymousUsers
@GET @Path("/anonymous") public javax.ws.rs.core.Response getPermissionsGrantedToAnonymousUsers(@PathParam("spaceKey") String spaceKey) Get the permissions granted to an anonymous users in the given space.
- Parameters:
spaceKey- the key of the space
-
getPermissionsGrantedToGroup
-
grantPermissionsToUser
@PUT @Path("user/{userKey}/grant") public javax.ws.rs.core.Response grantPermissionsToUser(@PathParam("spaceKey") String spaceKey, @PathParam("userKey") String userKey, Set<OperationDescription> permissions) Grant permissions to a user in the given space.
- Parameters:
spaceKey- the key of the space to updateuserKey- the key of the user to look uppermissions- the permissions being added
-
grantPermissionsToAnonymousUsers
@PUT @Path("anonymous/grant") public javax.ws.rs.core.Response grantPermissionsToAnonymousUsers(@PathParam("spaceKey") String spaceKey, Set<OperationDescription> permissions) Grant permissions to anonymous user in the given space.
- Parameters:
spaceKey- the key of the space to updatepermissions- the permissions being added
-
grantPermissionsToGroup
@PUT @Path("group/{groupName}/grant") public javax.ws.rs.core.Response grantPermissionsToGroup(@PathParam("spaceKey") String spaceKey, @PathParam("groupName") String groupName, Set<OperationDescription> permissions) Grant permissions to a group in the given space.
- Parameters:
spaceKey- the key of the space to updatepermissions- the permissions being added
-
revokePermissionsFromUser
@PUT @Path("user/{userKey}/revoke") public javax.ws.rs.core.Response revokePermissionsFromUser(@PathParam("spaceKey") String spaceKey, @PathParam("userKey") String userKey, Set<OperationDescription> permissions) Revoke permissions from a user in the given space.
- Parameters:
spaceKey- the key of the space to updatepermissions- the permissions being added
-
revokePermissionsFromAnonymousUser
@PUT @Path("anonymous/revoke") public javax.ws.rs.core.Response revokePermissionsFromAnonymousUser(@PathParam("spaceKey") String spaceKey, Set<OperationDescription> permissions) Revoke permissions from a user in the given space.
- Parameters:
spaceKey- the key of the space to updatepermissions- the permissions being added
-
revokePermissionsFromGroup
@PUT @Path("group/{groupName}/revoke") public javax.ws.rs.core.Response revokePermissionsFromGroup(@PathParam("spaceKey") String spaceKey, @PathParam("groupName") String groupName, Set<OperationDescription> permissions) Revoke permissions from a group in the given space.
- Parameters:
spaceKey- the key of the space to updatepermissions- the permissions being added
-
setPermissions
@POST public javax.ws.rs.core.Response setPermissions(@PathParam("spaceKey") String spaceKey, Set<SpacePermissionsForSubject> spacePermissionsForSubjects) Sets permissions to multiple users/groups in the given space. Request should contain all permissions that user/group will have in a given space. If permission is absent in the request, but was granted before, it will be revoked.
- Parameters:
spaceKey- the key of the space to updatespacePermissionsForSubjects- the permissions being added to multiple users/groups
-