0

I need to allow individual users or groups to be able to add content to pages and view hidden items.

In a previous version I have configured a role "Editors" and configured permissions on APP level and on a content type to allow CRUD operations. This has stopped working recently and now I get a error rendering the template because the Content variable is now null for non Admin users.

How do I configure the system so that a user that has edit permissions on a page can view all content types and can edit all content types on a specific app?

I am using a view configured to use a single content item of a specific content type and with a demo item that is not published so that content does not appear before is published.

I have tried to use app permissions and also permissions os a specific content type with no success: enter image description here

Also tried to setup a Role "Editors" and create permissions to allow edit on this items.

The edit permissions seem to be working because: When I publish the default item, the user can see it on the page and can use the edit command. If I unpublish the item I get a rendering error because I am trying to use the Content variable that is NULL (because the user cannot see it?). The error is: "Cannot perform runtime binding on a null reference" On the following code in my template:

@{
  var banner = Content;
}

So, how can I configure permissions and on what objects so that when a user can edit a page, he has access to the default item even when it is not published? I still need not published items to be hidden for unauthenticated users or users with read only access on a page.

As a last note, I am getting this error for any user that is not admin. I think that in previous versions, when a content was not published it would not be visible to the end user. Could this be true? How should I configure / review my templates to check if the content is viewable and avoid on screen errors like: enter image description here

Thanks!

Update: Testing in 2sxc version 12.2.1: Configured this permissions on my app permissions allows the user with edit rights on a page to view the hidden items. enter image description here Tried the same configuration on another server with 15.6.0 version with no success.

M Vaz
  • 23
  • 4
  • As no contributions were made on this post, I will try to open an issue on the 2sxc github. Will report back here if any relevant info is found. – M Vaz May 16 '23 at 18:18

0 Answers0