Signbank / Global-signbank

An online sign dictionary and sign database management system for research purposes. Developed originally by Steve Cassidy/ This repo is a fork for the Dutch version, previously called 'NGT-Signbank'.
http://signbank.cls.ru.nl
BSD 3-Clause "New" or "Revised" License
19 stars 12 forks source link

Clear up the permission system #709

Open Woseseltops opened 3 years ago

Woseseltops commented 3 years ago

The current permission system within Signbank has 3 layers:

  1. Active vs inactive. Inactive is used for accounts that didn't confirm their email or have been disabled (former colleagues).
  2. Groups: determines what kind of actions you are allowed to perform.
  3. Individual dataset permissions: determines which part of the data you are allowed to see.

However, there is more going on under the hood, as I recently discovered after lots of bug hunting hours:

Proposed changes:

susanodd commented 3 years ago

The view_dataset was intended to keep people from creating new signs or altering signs in a dataset. People originally have view_dataset permission only. They were meant to request change permission.

ocrasborn commented 3 years ago

@Woseseltops , isn't the 'view_dataset' permission what allows Dataset Managers to give people read access to their dataset at the following page? https://signbank.cls.ru.nl/datasets/manager

susanodd commented 1 year ago

There are some obsolete permissions for models that have since been deleted. Django doesn't delete these automatically. [Interpreter Feedback permissions still exist in the database after deleting the model, after the migrations have been run. #873.]

Regarding the Feedback, for which the user should be in group Editor, it looks like group Publisher has the same permissions. What is the distinction between Editor and Publisher?

susanodd commented 1 year ago

Not sure if this is relevant, for the Senses tests, the following permissions were required for the test user:

https://github.com/Signbank/Global-signbank/blob/99c055fd15ff6d6ccf8a66c6987a6a8ab6fc41bb/signbank/dictionary/tests.py#L3722-L3726

https://github.com/Signbank/Global-signbank/blob/99c055fd15ff6d6ccf8a66c6987a6a8ab6fc41bb/signbank/dictionary/tests.py#L3777

https://github.com/Signbank/Global-signbank/blob/99c055fd15ff6d6ccf8a66c6987a6a8ab6fc41bb/signbank/dictionary/tests.py#L3828

https://github.com/Signbank/Global-signbank/blob/99c055fd15ff6d6ccf8a66c6987a6a8ab6fc41bb/signbank/dictionary/tests.py#L3868