django-cms / djangocms-versioning

General purpose versioning package for Django CMS 4 and above.
Other
33 stars 29 forks source link

fix: Consistent use of action buttons #392

Closed fsbraun closed 3 months ago

fsbraun commented 3 months ago

Description

This PR makes the use of action buttons ("Publish", "Unpublish", "Discard", "Archive") consistent:

Currently, for example, a user w/o publishing permission will not see a "Publish" button. After this PR they will see one (if the object is a draft) but it will be disabled.

This is also the behaviour of the core.

Additionally, the same rules apply for "archive" which so far did not check any conditions if the user can archive the object, and "unlock version" which so far had only hard-coded checks and did not use the conditions framework.

Related resources

Checklist

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.50%. Comparing base (f90c5b2) to head (09e633e). Report is 11 commits behind head on master.

:exclamation: Current head 09e633e differs from pull request most recent head e7b95ed. Consider uploading reports for the commit e7b95ed to get more accurate results

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.