Sitecore 8: make a Rendering only visible to users with a given role

0 投票
最新提问 用户: (120 分)

I have a rendering which is part of a page, but I want it to be displayed only to users who have a specific Role.

I searched on the net but I could not find a solution to this - I already tried removing Read permissions for that specific Rendering, like so:

but to no avail. Does anyone knows the solution?


0 投票
最新回答 用户: (140 分)

You can use personalization in your layout details. There is a conditional rendering rule called "where the current user is a member of the [value,UserRoles,,specific] role" (in the Security group). For this condition you would set the data source (or leave it blank). In the default condition you would set "Hide Rendering"

Note: This rule does not take role inheritance into account. You would need to create a custom rule for that.

发表于 用户: (120 分)
Thanks, didn't know about that!
发表于 用户: (140 分)
No problem, happy to help
发表于 用户: (140 分)
If you need to evaluate also inherited security roles then to can take a look at my blog post that explains the process of creating such a condition.
欢迎来到 Security Q&A ,有什么不懂的可以尽管在这里提问,你将会收到社区其他成员的回答。