Skip to content

EQ Author Permissions Model

rmccar edited this page Mar 11, 2019 · 17 revisions

Querying a questionnaire

When the user logs in:

  1. Get the current user Id from the token.
  2. Loop through the questionnaire list.
  3. For each questionnaire check that the user has questionnaire read permission by looking it up in questionnaire list table.
  4. Show the questionnaire in the list if the user has read permissions, if the user doesn't have read permissions do not show questionnaire in the list

Data tables

Users

List of users

ID User Name
1 User1
2 User2

Questionnaire List

List of questionnaires

ID Title CreatedAt UpdatedAt Createdby Readlist Writelist
1 OPN 1532563200000 1532563200000 User1 [User1, User2] [User1, User2]
2 UKIS 1532563200000 1532563200000 User2 [User1, User2] [User1, User2]

Questionnaires Versions

List of questionnaires by versions

ID Title CreatedAt UpdatedAt CreatedBy LegalBasis Metadata ...
1 OPN 1532563200000 1532563200000 User1 StatisticsOfTradeAct {"alias":"Trad As... ...
2 UKIS 1532563200000 1532563200000 User2 StatisticsOfTradeAct {"alias":"Trad As... ...
Clone this wiki locally