November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
As explained in http://webhelp.episerver.com/CMS/7.5/EN/#Authorization/Admin_SettingAccessRightsTreeStructure.htm, you can assign users to a group, then assign read-only access rights for a page (and it descendants) to the group. These users can only see those pages -- they can't edit them.
Hi Nathan,
As Bob said, you can assign users to a group that has read-only access to a page. This will lock editing and publishing.
To show a message to users that have read but not publish access, you can use something like this the view:
@if (!Model.CurrentPage.ACL.QueryDistinctAccess(AccessLevel.Publish)) { <p>Please contact support to make this page active and editable...</p> }
And if you want that message to be visible only in edit mode, you can have something like this:
@if (PageEditing.PageIsInEditMode && !Model.CurrentPage.QueryDistinctAccess(AccessLevel.Publish)) { <p>Please contact support to make this page active and editable...</p> }
Hope this helps!
Hi Dejan, thank you for your response. I could not get it to work. I am a MVC newbie. When I put in your code, and got to Model.CurrentPage, I got an error on it and Visual Studio suggested it create a new property called CurrentPage on the model. That didn't look right to me. Do you know if there's a special set up deeper into the project that has to be done before CurrentPage is accessible like you have it? I'm sorry if those are bad questions. Again, I'm new at this. I'd appreciate some more insight if you have any. Thanks!
Hi Nathan,
My code is based on Alloy sample project.
Can you send me how your controller, view model, and view look like?
Is there a way to display content on a page in the CMS that only shows for specific user group members? What I want to do is lock editing and publishing of some pages for certain groups. Then if they go to that page in the CMS, they get a message that says something like, "Please contact support to make this page active and editable..." We're using Epi 7.5
Thanks!