Sling initial content loading - how to set access permissions?

后端 未结 1 862
失恋的感觉
失恋的感觉 2021-01-21 18:25

I have a bundle that was generated by the Maven sling-initial-content archetype, that means the content is imported into the repository when the bundle gets installed. I want an

相关标签:
1条回答
  • 2021-01-21 19:12

    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.

    0 讨论(0)
提交回复
热议问题