cancel
Showing results for 
Search instead for 
Did you mean: 

Remove Permissions to other users

frank83
Champ in-the-making
Champ in-the-making
Hi all,
Using Alfresco Web Services API, I have created a user  with his space in the user home space…
I would to know if it is possible remove read permission(Remove Consumer Role in alfresco) to the other users in his own space using web services api…
So the users see only their own spaces and no the others…
Thanks in advance…

Frank83
6 REPLIES 6

mduthoit
Champ in-the-making
Champ in-the-making
Are you find your answer ? Because I search it

Thank

janv
Employee
Employee

jos_snellings
Champ in-the-making
Champ in-the-making
Is this topic still fresh enough? Small example for a space indicated by "path", given a store.

setAccessControlList(Store store, String path,
      boolean inheritPermissions, Hashtable<String, String> accessControl)

     accessControlService = WebServiceFactory.getAccessControlService();

      Reference ref = new Reference(store, null, getXPathEscape(path));

      Predicate predicate = new Predicate(new Reference[] { ref }, store, null);

      ACE[] aces = new ACE[accessControl.size()];

      // remove existing …
      accessControlService.removeACEs(predicate, null);
      accessControlService.addACEs(predicate, aces);
      accessControlService.setInheritPermission(predicate, inheritPermissions);

vishal1
Champ in-the-making
Champ in-the-making
Hi,

How can I give read/write permission to given user using
accesscontrolService ?

Thanks

mahkath
Champ in-the-making
Champ in-the-making
You can try setting ownership to the file.
Try using below code.

AccessControlServiceSoapBindingStub accessService = WebServiceFactory.getAccessControlService();
accessService.setOwners(new Predicate(reference, STORE, null),userName);


Regards,
Mahesh

khinendra
Champ on-the-rise
Champ on-the-rise
Hi,

I want to know that whats the role of any logged in user over any space or file,
how can I do it?
What will be syntax for it?

Regards
Khinendra