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

Permissions That Allow User to Edit but Not Publish #709

Open
wesleyboar opened this issue Sep 19, 2022 · 1 comment
Open

Permissions That Allow User to Edit but Not Publish #709

wesleyboar opened this issue Sep 19, 2022 · 1 comment

Comments

@wesleyboar
Copy link
Contributor

wesleyboar commented Sep 19, 2022

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

  • If not intuitive to set up, then document permissions that achieve the goal.
  • If possible to add "publish" permission, then add:
    djangocms_blog | blog article | Can publish blog article

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 ... >
<select id="id_permissions_to" multiple="multiple" size="0" name="permissions" class="filtered"
    style="height: 250.398px;">
    <option value="274" title="bootstrap4_media | bootstrap4 media | Can change bootstrap4 media">bootstrap4_media |
        bootstrap4 media | Can change bootstrap4 media</option>
    <option value="276" title="bootstrap4_media | bootstrap4 media | Can view bootstrap4 media">bootstrap4_media |
        bootstrap4 media | Can view bootstrap4 media</option>
    <option value="278" title="bootstrap4_media | bootstrap4 media body | Can change bootstrap4 media body">
        bootstrap4_media | bootstrap4 media body | Can change bootstrap4 media body</option>
    <option value="280" title="bootstrap4_media | bootstrap4 media body | Can view bootstrap4 media body">
        bootstrap4_media | bootstrap4 media body | Can view bootstrap4 media body</option>
    <option value="281" title="bootstrap4_picture | bootstrap4 picture | Can add bootstrap4 picture">bootstrap4_picture
        | bootstrap4 picture | Can add bootstrap4 picture</option>
    <option value="282" title="bootstrap4_picture | bootstrap4 picture | Can change bootstrap4 picture">
        bootstrap4_picture | bootstrap4 picture | Can change bootstrap4 picture</option>
    <option value="283" title="bootstrap4_picture | bootstrap4 picture | Can delete bootstrap4 picture">
        bootstrap4_picture | bootstrap4 picture | Can delete bootstrap4 picture</option>
    <option value="284" title="bootstrap4_picture | bootstrap4 picture | Can view bootstrap4 picture">bootstrap4_picture
        | bootstrap4 picture | Can view bootstrap4 picture</option>
    <option value="32" title="cms | cms plugin | Can change cms plugin">cms | cms plugin | Can change cms plugin
    </option>
    <option value="34" title="cms | cms plugin | Can view cms plugin">cms | cms plugin | Can view cms plugin</option>
    <option value="2" title="cms | page | Can change page">cms | page | Can change page</option>
    <option value="45" title="cms | page | Can view page">cms | page | Can view page</option>
    <option value="1" title="cms | placeholder | Can use Structure mode">cms | placeholder | Can use Structure mode
    </option>
    <option value="361" title="djangocms_blog | blog article | Can add blog article">djangocms_blog | blog article | Can
        add blog article</option>
    <option value="362" title="djangocms_blog | blog article | Can change blog article">djangocms_blog | blog article |
        Can change blog article</option>
    <option value="364" title="djangocms_blog | blog article | Can view blog article">djangocms_blog | blog article |
        Can view blog article</option>
    <option value="150" title="djangocms_link | link | Can change link">djangocms_link | link | Can change link</option>
    <option value="152" title="djangocms_link | link | Can view link">djangocms_link | link | Can view link</option>
    <option value="88" title="djangocms_text_ckeditor | text | Can add text">djangocms_text_ckeditor | text | Can add
        text</option>
    <option value="89" title="djangocms_text_ckeditor | text | Can change text">djangocms_text_ckeditor | text | Can
        change text</option>
    <option value="90" title="djangocms_text_ckeditor | text | Can delete text">djangocms_text_ckeditor | text | Can
        delete text</option>
    <option value="91" title="djangocms_text_ckeditor | text | Can view text">djangocms_text_ckeditor | text | Can view
        text</option>
    <option value="182" title="djangocms_video | video player | Can change video player">djangocms_video | video player
        | Can change video player</option>
    <option value="184" title="djangocms_video | video player | Can view video player">djangocms_video | video player |
        Can view video player</option>
    <option value="186" title="djangocms_video | video source | Can change video source">djangocms_video | video source
        | Can change video source</option>
    <option value="188" title="djangocms_video | video source | Can view video source">djangocms_video | video source |
        Can view video source</option>
    <option value="190" title="djangocms_video | video track | Can change video track">djangocms_video | video track |
        Can change video track</option>
    <option value="192" title="djangocms_video | video track | Can view video track">djangocms_video | video track | Can
        view video track</option>
    <option value="114" title="filer | image | Can change image">filer | image | Can change image</option>
    <option value="116" title="filer | image | Can view image">filer | image | Can view image</option>
</select>

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 wesleyboar changed the title Explain What Permissions Can Allow User to Edit but Not Publish Permissions That Allow User to Edit but Not Publish Sep 19, 2022
@wesleyboar
Copy link
Contributor Author

wesleyboar commented Feb 10, 2023

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"): TACC/tup-ui#141.

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

No branches or pull requests

1 participant