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

feat: Add content object level publish permissions #390

Merged
merged 14 commits into from
Mar 12, 2024

Conversation

fsbraun
Copy link
Member

@fsbraun fsbraun commented Mar 11, 2024

Description

This PR adds object-level permissions for publication to djangocms-verisoning.

If the versioned content model has a method called has_publish_permission versioning will use it to determine of the user can publish the object.

If not it falls back to has_change_permission, has_placeholder_change_permission and lastly on the user's model-level permission to change the content model.

Related resources

  • #...
  • #...

Checklist

  • I have opened this pull request against master
  • 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 #workgroup-pr-review on
    Slack to find a “pr review buddy” who is going to review my pull request.

@fsbraun fsbraun requested review from marksweb and a team March 11, 2024 09:45
@fsbraun fsbraun changed the title feat: Add low-level permissions feat: Add content object level publish permissions Mar 11, 2024
Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.50%. Comparing base (f90c5b2) to head (585a329).
Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #390      +/-   ##
==========================================
+ Coverage   90.88%   91.50%   +0.62%     
==========================================
  Files          72       72              
  Lines        2546     2579      +33     
  Branches      361      368       +7     
==========================================
+ Hits         2314     2360      +46     
+ Misses        168      155      -13     
  Partials       64       64              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@marksweb marksweb left a comment

Choose a reason for hiding this comment

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

Quite a bit to digest here, but I think it looks good.

@fsbraun fsbraun merged commit 9c7ad78 into django-cms:master Mar 12, 2024
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants