Skip to content

feat(management): text & media editor groups#600

Merged
wesleyboar merged 16 commits intomainfrom
task/group-perms-content-editor-and-admin
Aug 30, 2023
Merged

feat(management): text & media editor groups#600
wesleyboar merged 16 commits intomainfrom
task/group-perms-content-editor-and-admin

Conversation

@wesleyboar
Copy link
Copy Markdown
Member

@wesleyboar wesleyboar commented Feb 13, 2023

Overview / Changes

  1. Add groups (and permissions):
    • Text Editor (Basic)
    • Text Editor (Advanced)
    • Media Editor (Basic)
    • Media Editor (Advanced)
  2. Update instructions to avoid bug.

Related

Testing

Follow taccsite_cms/management/commands/group_perms/README.md at "Set Permissions".

As time allows, review Django CMS - Developer Guide - Permissions & Groups.

Records
  • Permissions tested on ECEP on 2022-10-10.
  • Permissions refined and tested on TUP (dev) on 2023-02-28 and later (via TACC/tup-ui#171).
    Two users, dhop… and mat…, have been guinea pigs for all the permissions added.
  • Documentation and detailed record in Confluence.
  • 2023-08-30: Permissions tweak 2d7bd5b was done for TUP (prod) at the same time.

UI

Skipped. I am out of patience with permissions. I barely made it through screenshots for TACC/tup-ui#173. No rush, so maybe I come back to this.

2023-08-30: Skipped still. Merging. Records show I did my due diligence, I just didn't take pictures. And all Known Issues had been fixed.

Notes

Ideas

  1. Share duplicate permissions between"… Editor (Basic) and "… Editor (Advanced)".
  2. Share permissions from a set of mixin permissions e.g.
    • filer_file_editor_advanced
    • filer_file_editor_basic
    • filer_image_editor_advanced
    • filer_image_editor_basic

Known Issues

  1. Permissions with same name raises warning and adds only one.

    ✓ This was fixed by ace057a and bcc4721.

    33, in set_group_perms
        group.permissions.add( Permission.objects.get(name='Can add file') )
      File "/opt/pysetup/.venv/lib/python3.8/site-packages/django/db/models/manager.py", line 82, in manager_method
        return getattr(self.get_queryset(), name)(*args, **kwargs)
      File "/opt/pysetup/.venv/lib/python3.8/site-packages/django/db/models/query.py", line 410, in get
        raise self.model.MultipleObjectsReturned(
    django.contrib.auth.models.MultipleObjectsReturned: get() returned more than one Permission -- it returned 2!
    

@wesleyboar wesleyboar marked this pull request as draft February 13, 2023 20:09
@wesleyboar wesleyboar added the paused Started but not actively in progress label Feb 13, 2023
@wesleyboar wesleyboar removed the paused Started but not actively in progress label Feb 27, 2023
That plugin creates wrappers, Style plugin already supports better.
@wesleyboar wesleyboar changed the title feat(management): content editor & admin groups feat(management): text & media editor groups Feb 28, 2023
@wesleyboar wesleyboar marked this pull request as ready for review February 28, 2023 17:57
@wesleyboar wesleyboar added the feature A new feature or replacement of present feature label May 10, 2023
@wesleyboar wesleyboar merged commit 148cd72 into main Aug 30, 2023
@wesleyboar wesleyboar deleted the task/group-perms-content-editor-and-admin branch August 30, 2023 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature A new feature or replacement of present feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant