-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: grid editor group and permissions (#896)
* feat: grid editor (⚠️ untested) * fix: grid editor "row" not "rw" * fix: grid editor permission name typos
- Loading branch information
1 parent
13b5279
commit 42190a7
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
taccsite_cms/management/commands/group_perms/grid_editor_advanced.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from django.contrib.auth.models import Group | ||
|
||
from .util import add_perm | ||
|
||
def set_group_perms(): | ||
group, was_created = Group.objects.get_or_create( | ||
name='Grid Editor (Advanced)' | ||
) | ||
|
||
add_perm(group, 'cms', 'page', 'Can change page') | ||
add_perm(group, 'cms', 'page', 'Can view page') | ||
|
||
add_perm(group, 'cms', 'placeholder', 'Can use Structure mode') | ||
|
||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid container', 'Can add bootstrap4 grid container') | ||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid container', 'Can change bootstrap4 grid container') | ||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid container', 'Can delete bootstrap4 grid container') | ||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid container', 'Can view bootstrap4 grid container') | ||
|
||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid column', 'Can add bootstrap4 grid column') | ||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid column', 'Can change bootstrap4 grid column') | ||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid column', 'Can delete bootstrap4 grid column') | ||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid column', 'Can view bootstrap4 grid column') | ||
|
||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid row', 'Can add bootstrap4 grid row') | ||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid row', 'Can change bootstrap4 grid row') | ||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid row', 'Can delete bootstrap4 grid row') | ||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid row', 'Can view bootstrap4 grid row') |
22 changes: 22 additions & 0 deletions
22
taccsite_cms/management/commands/group_perms/grid_editor_basic.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from django.contrib.auth.models import Group | ||
|
||
from .util import add_perm | ||
|
||
def set_group_perms(): | ||
group, was_created = Group.objects.get_or_create( | ||
name='Grid Editor (Basic)' | ||
) | ||
|
||
add_perm(group, 'cms', 'page', 'Can change page') | ||
add_perm(group, 'cms', 'page', 'Can view page') | ||
|
||
add_perm(group, 'cms', 'placeholder', 'Can use Structure mode') | ||
|
||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid container', 'Can change bootstrap4 grid container') | ||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid container', 'Can view bootstrap4 grid container') | ||
|
||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid column', 'Can change bootstrap4 grid column') | ||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid column', 'Can view bootstrap4 grid column') | ||
|
||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid row', 'Can change bootstrap4 grid row') | ||
add_perm(group, 'bootstrap4_grid', 'bootstrap4 grid row', 'Can view bootstrap4 grid row') |