cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable user account with WS

moris86
Champ in-the-making
Champ in-the-making
Hello,

I have one question about user management with web services in Alfresco 3.4. I have already tried to create, update and delete users with WS and all worked fine. But I'm not allow to find solution how to disable user accouts.

Can anybody help me, please?

I know that it is possible to do with web scrips, but I prefer web services in my app.

Thanks for any suggestion.

JM
2 REPLIES 2

mihir_mistry
Champ in-the-making
Champ in-the-making
Hi Moris,

You can achieve this via web service.

Inject this service.

private MutableAuthenticationService authenticationService;

and try this one in your method which disable user account.

authenticationService.setAuthenticationEnabled(userName, false);

Hope this will help you.

Regards,

Mihir Mistry

moris86
Champ in-the-making
Champ in-the-making
Thank you. But I don't  know where to inject MutableAuthenticationService object?

private MutableAuthenticationService authenticationService;

I uses Axis for generating Java code according to WSDL for AuthenticationService.

Thank you in advance for your answer,

JM