-
Notifications
You must be signed in to change notification settings - Fork 1
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: better group perms mgmt #895
Open
wesleyboar
wants to merge
16
commits into
main
Choose a base branch
from
epic/cmd-189-simple-group-mgmt
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* chore: remove unused imports * refactor: add & use add_perm utility function * docs: add & use add_perm utility function * docs: missing spaces * docs: missing spaces
* feat: grid editor (⚠️ untested) * fix: grid editor "row" not "rw" * fix: grid editor permission name typos
wesleyboar
force-pushed
the
epic/cmd-189-simple-group-mgmt
branch
from
November 15, 2024 23:46
e3762f6
to
42190a7
Compare
wesleyboar
changed the title
feat: simplify group mgmt for admins
feat: simplify group perms mgmt
Nov 18, 2024
wesleyboar
changed the title
feat: simplify group perms mgmt
feat:"better" group perms mgmt
Nov 18, 2024
wesleyboar
changed the title
feat:"better" group perms mgmt
feat: better group perms mgmt
Nov 18, 2024
wesleyboar
commented
Nov 19, 2024
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.
Tasks
From joint peer code review on Zoom:
- Document what each of these groups provide for the user (one sentence) i.e. why you would give someone this group.
- Add a custom migration for these. (New migration might remove/change permissions.)
- The migration could empty the existing permission form existing groups, then run the scripts.
- A good primer on migration.
The previous documentation would allow groups that reference other groups to become inaccurate when referenced group changes without updating referencing group
@taoteg, please review updated documentation. |
Instruct developer how to update all instances of CMS via migrations.
Testing: 0. Have a running CMS. 1. Enter CMS Docker container. <sup>e.g. docker exec -it core_cms /bin/bash</sup> 2. Add groups implicitely via migration: `python manage.py migrate taccsite_cms` 3. Verify [groups], and their permissions, are **present**. 4. Reverse that migration: `python manage.py migrate taccsite_cms zero` 5. Verify [groups], and their permissions, are **absent**. 6. Add groups explicitely via migration: `python manage.py migrate taccsite_cms 0001_add_groups` 7. Verify [groups], and their permissions, are **present**. 8. Reverse that migration: `python manage.py migrate taccsite_cms zero` 9. Verify [groups], and their permissions, are **absent**. [groups]: https://localhost:8000/admin/auth/group
@jarosenb & @rstijerina, please review new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Allow developers to offer Groups with overlapping permissions but less redundant code.
Related
add_perm
#899Changes
util.py
add_perm
Can change static placeholder
1Testing
via Custom Migration
python manage.py migrate taccsite_cms
python manage.py migrate taccsite_cms zero
python manage.py migrate taccsite_cms 0001_add_groups
python manage.py migrate taccsite_cms zero
via Mgmt. Command
python manage.py set_group_perms grid_editor_basic grid_editor_advanced text_editor_basic text_editor_advanced media_editor_basic media_editor_advanced news_writer_basic news_writer_advanced
I merely skimmed the results.
UI
via Custom Migration
implicit.migrate.then.revert.mov
explicit.migrate.then.revert.mov
Note
The
SearchAppHook
error is unrelated. I have a local page expecting code from another branch.via Mgmt. Command
Footnotes
Let's editor see "Edit" and "View published" button. WTCS users could not. One avid TACC editor sometimes can not. ↩
Run
docker exec -it core_cms /bin/bash
to enter CMS container. ↩ ↩2