Sling initial content loading - how to set access permissions?

南楼画角 提交于 2019-12-02 00:19:51

I think Sling's content loader module cannot handle those nodes, it would need special handling for them, to convert them into the corresponding JCR calls that set ACLs.

Jackrabbit's filevault module does implement this using fake rep:ACL nodetypes that are interpreted when loading such content files, IIUC. Using filevault might be an option if you really need those ACLs in the initial content files.

The alternative in Sling is to use the bundle's Activator, or an OSGi component provided by that bundle, to set the ACLs as desired (only once, if your users are allowed to change them). I think the initial content will be installed before the Activator or OSGi components are activated, but you'll need to verify that.

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