diff --git a/taccsite_cms/management/commands/group_perms/grid_editor_advanced.py b/taccsite_cms/management/commands/group_perms/grid_editor_advanced.py new file mode 100644 index 000000000..5b3715355 --- /dev/null +++ b/taccsite_cms/management/commands/group_perms/grid_editor_advanced.py @@ -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') diff --git a/taccsite_cms/management/commands/group_perms/grid_editor_basic.py b/taccsite_cms/management/commands/group_perms/grid_editor_basic.py new file mode 100644 index 000000000..e27e69c0b --- /dev/null +++ b/taccsite_cms/management/commands/group_perms/grid_editor_basic.py @@ -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')