简体   繁体   English

如何为 Gentics Mesh 中的新节点设置默认权限?

[英]How can I set default permissions on new nodes in Gentics Mesh?

I'd like anonymous users to have 'read published' permission to all newly created nodes under a specific node.我希望匿名用户对特定节点下的所有新创建的节点具有“读取已发布”权限。

I can grant permission to a node after it's created, but is there a way to specify the permission when creating?我可以在节点创建后授予权限,但是有没有办法在创建时指定权限? Or is there a way to make new nodes inherit their parent node permissions by default?或者有没有办法让新节点默认继承其父节点权限?

I don't see the options in the node API docs, but curious if there was an undocumented feature, or maybe I'm looking in the wrong place.我没有看到节点 API 文档中的选项,但很好奇是否有未记录的功能,或者我找错了地方。

https://getmesh.io/docs/api/#project__nodes__post https://getmesh.io/docs/api/#project__nodes__post

All permissions (assigned role perms) of the parent node will automatically be inherited to the created children.父节点的所有权限(分配的角色权限)将自动继承给创建的子节点。

You can check the implementation here: https://github.com/gentics/mesh/blob/dev/core/src/main/java/com/gentics/mesh/core/data/root/impl/NodeRootImpl.java#L258你可以在这里检查实现: https : //github.com/gentics/mesh/blob/dev/core/src/main/java/com/gentics/mesh/core/data/root/impl/NodeRootImpl.java#L258

Please file an issue with steps to reproduce if you have the impression that this is not working as expected.如果您觉得这没有按预期工作,请提交有关重现步骤的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM