0.5.1
The initializers for users and groups now support a permissions
array. Examples:
# initializers/groups.yml
a-group-called-writer:
users:
- a-user-called-writer
permissions:
- add_device
- change_device
- delete_device
- add_virtualmachine
- change_virtualmachine
- delete_virtualmachine
# initializers/users.yml
a-user-called-writer:
password: writer
permissions:
- add_device
- change_device
- delete_device
- add_virtualmachine
- change_virtualmachine
- delete_virtualmachine
Get a list of all available permissions:
echo "from django.contrib.auth.models import Permission\nfor p in Permission.objects.all():\n print(p.codename);" | docker-compose exec -T netbox ./manage.py shell
Thanks to @bdlamprecht for the research that made this improvement possible.