Check this class https://docs.atlassian.com/confluence/latest/com/atlassian/confluence/user/UserAccessor.html.
You could get UserAccessor object by dependency injection.
See https://developer.atlassian.com/display/CONFDEV/Accessing+Confluence+Components+from+Plugin+Modules
Hi.
Now i have another problem.
When i try to create a new user in the way described by Marcin, i get exception: bucket.user.LicensingException: You are not licensed to add any more users to this installation of Confluence. Please contact sales@atlassian.com.
Here's my code:
ConfluenceUserImpl u = new ConfluenceUserImpl("John", "John", "john@john.com");
try{
userAccessor.createUser(u, Credential.unencrypted("123123"));
} catch (Exception e) {
String s = e.getMessage();
return ERROR;
}
Any ideas how to avoid this error?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I use regular Atlassian SDK downloaded from the official website, so i think i have the test license. Or i need to install the license manually? Another question: When i create a new user do i need to be logged in as a admin necessarily?
Sorry for stupid questions i'm novice in atlassian development )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not sure but rather you don't have to be logged as admin. I'll have to check it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, unfortunately if i try to add or remove users via UserAccessor i need to be logged in as an administrator... Are there any ways to avoid this restriction?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have a similar issue with the method "UserAccessor.addMembership(Group, User)" called inside a user macro. My intention is to deliver a delegated maintenance for some group (adding members to that group).
When I am logged in as administrator I can run the user macro in a page. When I log in as a default user I get an Error message.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So with test license your server is limited to use only 5 users.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.
Now i have another problem.
When i try to create a new user in the way described by Marcin, i get exception: bucket.user.LicensingException: You are not licensed to add any more users to this installation of Confluence. Please contact sales@atlassian.com.
Here's my code:
ConfluenceUserImpl u = new ConfluenceUserImpl("John", "John", "john@john.com");
try{
userAccessor.createUser(u, Credential.unencrypted("123123"));
} catch (Exception e) {
String s = e.getMessage();
return ERROR;
}
Any ideas how to avoid this error?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See related question from 2012 https://answers.atlassian.com/questions/35897/bulk-create-users
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes.
General API Documentation
https://developer.atlassian.com/display/CONFDEV/Confluence+XML-RPC+and+SOAP+APIs
User Management Methods for the SOAP API
https://developer.atlassian.com/display/CONFDEV/Remote+Confluence+Methods#RemoteConfluenceMethods-UserManagement
The REST API is now going to be the officially support API going forward so you should get the REST API Browser to be able to see what methods are available. Unfortunately the REST API documentation is pretty slim.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.