Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different behaviour between split/edit mode - user with read only access #1394

Open
Jianbinzhu opened this issue Nov 24, 2022 · 3 comments
Open

Comments

@Jianbinzhu
Copy link

Jianbinzhu commented Nov 24, 2022

A content reviewer (read only access) logs in to the CMS and views a page, the settings tab can be access if in edit mode, it redirects to the content tab if in split mode.

user access:
Screen Shot 2022-11-24 at 6 45 17 PM

Steps to reproduce:
User logs into the CMS with read only access,
then go to a page with split mode,
then go to the Settings tab,
it redirects to the content tab.
Change to edit mode,
then try go to the Settings tab,
it doesn't redirect to content tab.

@GuySartorelli
Copy link
Member

GuySartorelli commented Nov 29, 2022

Are you using $MetaTags in the page template? If so, I suspect it's related to the functionality that identifies the page ID of the page being previewed and navigates to that page's edit form.

If that's the case, a workaround would be to either not use $MetaTags in the template, or override the MetaTags() method in your Page class, removing the x-page-id and x-cms-edit-link meta tags (which are only present for the preview anyway)

@Jianbinzhu
Copy link
Author

@GuySartorelli What is the expected behaviour for a Content reviewer (read only access) to access the Settings tab? When we were trying to resolve an issue for the content review module silverstripe/silverstripe-contentreview#175 we manage to find a workaround by adding a hidden input field (value equals to the Page ID) to the Settings tab. It stopped the redirection from happening.

@GuySartorelli
Copy link
Member

That makes sense - the content tab already has that hidden field and I believe that's what is compared against the $MetaTags ID - though I would expect that if there is no ID field to compare against it shouldn't try to redirect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants