Sitecore 允许角色仅在特定区域发布内容
我正在尝试在 Sitecore 中创建一个可以发布内容的角色,但只能在网站的特定区域内发布。我已将标准 Sitecore\Client Publishing
角色添加到我的角色中,但我不知道如何阻止该角色发布网站的所有区域。我查看了安全编辑器和访问查看器,但设置这些部分的写入权限似乎仅影响编辑这些部分的能力,并且对在这些部分上发布的能力没有影响。
I am trying to create a role within Sitecore which can publish content, but only within a specific area(s) of the site. I've added the standard Sitecore\Client Publishing
role to my role, but I can't see how to prevent the role from being able to publish all areas of the site. I've looked at the Security editor and the Access viewer, but setting the write access of the sections only seems to affect the ability to edit those sections and has no effect on the ability to publish on those sections.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我曾经遇到过类似的情况,我为每个部分创建了一些角色,这些角色只能读取和写入该部分,而没有其他地方(比如说“编辑器第1部分”),而另一个角色只有该部分的发布权限(比如说“出版商”)第 1 节)。然后将“编辑者部分 1”角色添加到“发布者部分 1”角色,这为您提供了仅发布特定部分的角色。
你不需要多个工作流程,同一个工作流程具有多个角色也可以实现这个目标
I had a similar situation once and I created roles per section which only had read and write to that section and no where else (let say 'editor section 1') and another role which only had publishing permission for that section (let say 'publisher section 1'). Then added 'editor section 1' role to 'publisher section 1' role which gives you the role for publishing only specific section.
You do not need multiple workflows, same workflow with multiple roles can also achieve this goal
答案是将 Publishing.CheckSecurity 设置为 true
您需要在 web 中找到此代码
设置 value="true"
但同样,您必须严格控制安全性,并正确分配用户角色。失败
这样做你会遇到有问题的发布。
希望这会有所帮助
Answer to this is to set Publishing.CheckSecurity to true
You need to find this code inside web
Set the value="true"
But again you have to govern the security tightly, and assign user role properly. Failed to
do so you will experience buggy publishing.
Hope that will help
工作流是处理此问题的典型方式。授予角色访问权限以批准(这可以称为“发布”)内容树的某些部分的内容将是实现您所描述的内容的最佳方式。将此与自动发布操作结合起来,使其更加用户友好。
使用此方法时要记住的一件事是引用的项目(例如,内容可能使用的媒体库中的图像)。看一下共享源库上的“Publishing Spider”模块 http://trac.sitecore.net/PublishingSpider
编辑:更新
我最近在 web.config 中发现了这个设置:“Publishing.CheckSecurity”。如果设置为 true,则此设置仅在用户对项目具有读+写权限时才会发布项目,并且仅在用户具有删除权限时才会从 Web DB 中删除项目。
Workflow is the typical way this is handled. Giving roles access to approve (this could be called 'publish') content of certain sections of the content tree will be the best way to achieve what you are describing. Combine this with an auto-publish action to make it more user friendly.
One thing to keep in mind though using this method is referenced items (images from media library the content may be using for example). Take a look at the 'Publishing Spider' module on the shared source library http://trac.sitecore.net/PublishingSpider
EDIT: Update
I recently discovered this setting in the web.config: "Publishing.CheckSecurity". If set to true, this setting will only publish items if the user has read + write on the item and will only remove items from the web DB if the user has delete permissions.