Class UserResource
java.lang.Object
com.atlassian.confluence.functest.rest.admin.UserResource
@Consumes("application/json")
@Produces("application/json")
@Path("/admin/user")
public class UserResource
extends Object
User management features missing from core Confluence today.
Shamelessly copy-pasta'd from the Crowd REST Plugin SearchResource and SearchController, with simplifications to make it use the CrowdService, instead of the ApplicationService.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
UntilLongTaskSubmission
is converted to rest v2, we have this to allow us to serialize one. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUserResource
(com.atlassian.crowd.embedded.api.CrowdService crowdService, PersonService personService, UserAccessor userAccessor) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
deleteUser
(String userKey) javax.ws.rs.core.Response
searchGroups
(SearchRestrictionEntity searchRestrictionEntity, int startIndex, int maxResults) javax.ws.rs.core.Response
searchUsers
(SearchRestrictionEntity searchRestrictionEntity, int startIndex, int maxResults) void
unsyncUser
(String username)
-
Field Details
-
DEFAULT_SEARCH_RESULT_SIZE
- See Also:
-
-
Constructor Details
-
UserResource
@Inject public UserResource(com.atlassian.crowd.embedded.api.CrowdService crowdService, PersonService personService, UserAccessor userAccessor)
-
-
Method Details
-
searchUsers
@POST @Path("/search/user") public javax.ws.rs.core.Response searchUsers(SearchRestrictionEntity searchRestrictionEntity, @DefaultValue("0") @QueryParam("start-index") int startIndex, @DefaultValue("1000") @QueryParam("max-results") int maxResults) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
searchGroups
@POST @Path("/search/group") public javax.ws.rs.core.Response searchGroups(SearchRestrictionEntity searchRestrictionEntity, @DefaultValue("0") @QueryParam("start-index") int startIndex, @DefaultValue("1000") @QueryParam("max-results") int maxResults) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
deleteUser
@DELETE @Path("/{userKey}") public UserResource.LongTaskSubmission deleteUser(@PathParam("userKey") String userKey) -
unsyncUser
@DELETE @Path("/unsync/{username}") public void unsyncUser(@PathParam("username") String username) throws com.atlassian.crowd.exception.OperationNotPermittedException - Throws:
com.atlassian.crowd.exception.OperationNotPermittedException
-
countUnsyncedUsers
@GET @Path("/unsynced/count") public javax.ws.rs.core.Response countUnsyncedUsers()
-