-
Notifications
You must be signed in to change notification settings - Fork 30
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
Conversation
…model if possible
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
There was a problem hiding this 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.
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
master
Slack to find a “pr review buddy” who is going to review my pull request.