nephila / djangocms-blog

django CMS blog application - Support for multilingual posts, placeholders, social network meta tags and configurable apphooks
https://djangocms-blog.readthedocs.io
BSD 3-Clause "New" or "Revised" License
391 stars 192 forks source link

Permissions That Allow User to Edit but Not Publish #709

Open wesleyboar opened 1 year ago

wesleyboar commented 1 year ago

Description

Either describe or support a set of permissions allow a User/Group to be able to add and edit blog articles, but not publish blog articles.

Use cases

News organizations with a workflow that distinguishes who writes (adds and edits) articles, and who approves (publishes) articles.

Proposed solution

Alternatives

I have found no combination of permissions that supports my organization's needs.

Additional information

This is how I currently have set up permissions:

Group Permissions

News Editor

Basically, this group can add, change, and view articles but not publish CMS pages. (I know articles differ from pages, but I don't see how to distinguish what data of an article can be edited and what cannot, so I am trying any possibly sensible combination.)

Markup of "CHOSEN PERMISSIONS"
click to show/hide <select multiple ... >
```html ```

Page Permissions

News (i.e. Blog) Page

USER GROUP CAN ADD CAN EDIT CAN DELETE CAN PUBLISH CAN CHANGE ADVANCED SETTINGS CAN CHANGE PERMISSIONS CAN MOVE GRANT ON DELETE?
- News Editor Page descendants

Page Global Permissions

News Editor

None.

wesleyboar commented 1 year ago

I made progress adjusting my client CMS to allow this.

To Ease Testing ⭐️

Add these settings (source):

CMS_PERMISSIONS = True
# IMPORTANT: All values must be set (to prevent KeyError)
CMS_CACHE_DURATIONS = {
    'menus': 60,
    'content': 60,
    'permissions': 0,
}

To Easily Add Permissions ✅

See https://github.com/TACC/Core-CMS/blob/f090ccc/taccsite_cms/management/commands/group_perms/news_writer_advanced.py.

To Not Let User Publish Article 🐞

With caveats (see "Status"): https://github.com/TACC/tup-ui/pull/141.