How to manage access permission in alfresco

被刻印的时光 ゝ 提交于 2019-12-02 09:47:30

If you want to use a group, you'll need to create the group in Alfresco using either the admin console or the Alfresco API. CMIS cannot manage users or groups.

Once your users and groups are in place, you can use CMIS to assign them to ACLs. However, the challenge is that you may need to disable or "break" ACL inheritance to do exactly what you want. You cannot disable ACL inheritance with the CMIS API. You'll have to do it in the UI or through the Alfresco API.

With your users and groups in place and with your folders configured to inherit or not inherit parent permissions as needed, you can now add users and groups to your folders. With CMIS, you can add as many users or groups as you need to a given folder. It is not limited to a single user or group. This page has some examples on using Access Control Entries (ACEs) which make up Access Control Lists (ACLs).

Yagami Light

I think that Jeff Potts answer is great i will only add few thing's you can look to this post it will give you an answer how to work with ACL How to get Acls of a document.

You can also use the allowable action in any Folder (or document) it will look like this :

 Action a = Action.CAN_DELETE_OBJECT;
 object = session.getObjectByPath(idObject); // In case it's a folder
 if (object.getAllowableActions().getAllowableActions().contains(a)) {

        return Boolean.TRUE;// You can do it 

 }

Only remember that you can get the allowable action from String (In case you want work with few of them)

String canCreateFolder= Action.CAN_CREATE_FOLDER.value(); 

the most importante Action that you have to use :

can_create_folder = Action.CAN_CREATE_FOLDER.value();
can_create_document = Action.CAN_CREATE_DOCUMENT.value();
can_update_folder = Action.CAN_UPDATE_PROPERTIES.value();
can_update_document = Action.CAN_UPDATE_PROPERTIES.value();
can_delete_folder = Action.CAN_DELETE_OBJECT.value();
can_delete_document = Action.CAN_DELETE_OBJECT.value();

Hope that helped you.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!