Are there any examples of using groups and then doing SetACE operation ?

We are planning to use groups to set the domain permissions for a group of users. Are there any examples on how to create a group and then call the SetACE for a group instead of a user ?

0 votes

1 answers

2000 views

ANSWER

Did you try. It must work… Did you have some trouble ?
09/21/2012

I mean how to create to group using nuxeo operation. I can see it being done using Admin tool but how to do it using nuxeo operation by REST call.
09/21/2012



There is no Group creation operation, neither user creation operation. You will have to create your own operation with Nuxeo IDE.

There is a Nuxeo Service that manage users and groups.

    UserManager userManager = Framework.getService(UserManager.class);
    if (userManager == null) {
        throw new Exception("unable to get userManager service");
    }
   DocumentModel newUser = userManager.getBareUserModel();
   ... initialize values ...
   userManager.createUser(newUser)

idem for groups.

   DocumentModel newGroup = userManager.getBareGroupModel();
   ... initialize values ...
   userManager.createGroup(newGroup)

see user.xsd schema and group schema for field names.

Hope this will help you.

0 votes



But how do we set permissions to a group ? Can we use setACE for a group instead of a user ?
09/24/2012

Just put the group name
09/26/2012