Skip to content

Lexicon_permissions

Henri edited this page May 16, 2017 · 11 revisions

How to control user permissions for Lexicons

For a user to be able to access a Lexicon, the user needs to be added into a Group that has access to the desired Lexicon.

We use django-guardian to manage object level permissions: https://github.com/django-guardian/django-guardian

It is recommended to create a Group for each Dataset (=Lexicon). To allow a Group to access a Dataset, it is required that the group is listed in the desired Datasets object permissions. All of this can be done in django's admin pages.

1. Create a Group

Go to django-admin and create a group and select a descriptive name for it, for example "Lexicon-Test".

2. Add the created Group to Datasets object permissions list

  • In django-admin select a Dataset and view its information.

  • Then click 'Object permissions' in the upper right corner:

  • Write the Groups name into the field 'Group' and press 'Manage Groups':

  • Select permission 'View dataset' press the right arrow to move it to the rightmost box, then click save.

  • After this, if you return to the Datasets object permission page, you should see the Group added in there:

3. Add all the users that should have access to this Lexicon into the Group created

  • Go into the 'Users' page in django-admin, select a user and add the user into this group, and then save:
Clone this wiki locally