Skip to content

0.5.1

Compare
Choose a tag to compare
@ninech-bot ninech-bot released this 16 Oct 07:38

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.