From ba3176f140973b6bad219269a24467e6aa1b3a3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=A4der?= Date: Fri, 31 Jan 2020 11:37:05 +0100 Subject: [PATCH] Added missing keywords to the yaml ... and moved some documentatory comments to the beginning of the file. --- initializers/groups.yml | 17 +++++++++++++++-- initializers/users.yml | 13 ++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/initializers/groups.yml b/initializers/groups.yml index 67a9290..b91ef39 100644 --- a/initializers/groups.yml +++ b/initializers/groups.yml @@ -1,3 +1,15 @@ +## To list all permissions, run: +## +## docker-compose run --rm --entrypoint /bin/bash netbox +## $ ./manage.py migrate +## $ ./manage.py shell +## > from django.contrib.auth.models import Permission +## > print('\n'.join([p.codename for p in Permission.objects.all()])) +## +## Permission lists support wildcards. See the examples below. +## +## Examples: + # applications: # users: # - technical_user @@ -7,16 +19,17 @@ # writers: # users: # - writer -## specify explicit permission codenames or include wildcard to match multiple permissions # permissions: # - delete_device # - delete_virtualmachine # - add_* # - change_* # vm_managers: -## yaml doesn't allow starting a key with an asterisk without explicit use of single quote +# permissions: # - '*_virtualmachine' # device_managers: +# permissions: # - '*device*' # creators: +# permissions: # - add_* diff --git a/initializers/users.yml b/initializers/users.yml index ad654b7..2aea62e 100644 --- a/initializers/users.yml +++ b/initializers/users.yml @@ -1,10 +1,21 @@ +## To list all permissions, run: +## +## docker-compose run --rm --entrypoint /bin/bash netbox +## $ ./manage.py migrate +## $ ./manage.py shell +## > from django.contrib.auth.models import Permission +## > print('\n'.join([p.codename for p in Permission.objects.all()])) +## +## Permission lists support wildcards. See the examples below. +## +## Examples: + # technical_user: # api_token: 0123456789technicaluser789abcdef01234567 # must be looooong! # reader: # password: reader # writer: # password: writer -## specify explicit permission codenames or include wildcard to match multiple permissions # permissions: # - delete_device # - delete_virtualmachine