cancel
Showing results for 
Search instead for 
Did you mean: 

disable account?

ryanbobko
Champ in-the-making
Champ in-the-making
Hey Folks,
I'm trying to disable an account via …/alfresco/service/api/people/{userName}. I'm sending in a json object like this:
{"disableAccount": true }
using the admin account, but it doesn't seem to do anything.

How can I troubleshoot this? The javascript debugger doesn't seem to work with this webscript.

Also, is there a way to tell what format the json object should have? For example, I just looked at the
…/alfresco/service/script/org/alfresco/repository/person/person.put page and made a json object that conforms.

Thanks All,
3 REPLIES 3

ryanbobko
Champ in-the-making
Champ in-the-making
New information: Looks like I can't create a user by POSTing to …/alfresco/service/api/people, either. I get the admin account in return instead of the new user (who isn't created, anyway).

Does anyone have sample code for creating a new user using javascript webservice api?

mrogers
Star Contributor
Star Contributor
For your first question check that you are setting the mimetype of your PUT request.  It should work.     You also need to have "admin" authority.

What error messages do you get?

ryanbobko
Champ in-the-making
Champ in-the-making
Followup: Looks like it worked. The step I was missing was sending "Content-Type: application/json" in the headers.