Review group grants


Drag the divider or use the arrow keys to compare themes.
Django Chassis 1.0.23 · training site with Russian UI
- The group form organizes permissions by Django application.
- The training catalog grants separate model and transfer-history permissions.
How to add it
The users module registers Chassis GroupAdmin, which shows the grouped permission grid. After applying the catalog migrations, run this in the demo directory with ./run.sh shell to give the reader group the grants shown. Open the group under Administrators → Groups as an active staff superuser and expand the catalog app.
from django.contrib.auth.models import Group, Permission, User
permissions = Permission.objects.filter(
content_type__app_label='catalog_demo',
codename__in=['view_device', 'view_category', 'view_device_import', 'view_device_export']
)
group, _ = Group.objects.get_or_create(name='Читатели учебного каталога')
group.permissions.add(*permissions)
User.objects.get(username='demo-viewer').groups.add(group)