8000 fix: Allow viewing page settings even if page cannot be changed by fsbraun · Pull Request #7921 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

fix: Allow viewing page settings even if page cannot be changed #7921

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

Merged
merged 1 commit into from
May 15, 2024

Conversation

fsbraun
Copy link
Member
@fsbraun fsbraun commented May 14, 2024

Description

This PR fixes django-cms/djangocms-versioning#409

django CMS does not differentiate user or page-based permissions to change or view page settings.

Since django CMS versioning overwrites the has_change_permission method of the PageContentAdmin class, it needs a has_view_permission method, too. By default, they do return the same logic based on the user's ability to change this page. It is however not overwritten when a subclass adds to the has_change_permission logic.

Related resources

Checklist

  • I have opened this pull request against develop-4
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined the channel #pr-reviews on our Discord Server to find a “pr review buddy” who is going to review my pull request.

@fsbraun fsbraun requested review from jrief and a team May 14, 2024 21:20
@fsbraun fsbraun added the 4.1 label May 14, 2024
Copy link
Contributor
@jrief jrief left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that this PR fixes issue django-cms/djangocms-versioning#409

Thanks for the quick response.

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

Successfully merging this pull request may close these issues.

Permission denied is raised, although user has permission to edit the page
2 participants
0