Table: permission

Comment: Contains at most one row per user per study, each row defining the PLHDB permission level the study grants to the user. PLHDB permissions apply only to PLHDB manager and user accounts, and managers may change any of them. When a user has no row for a study the user has no permissions to the study. The combination of study and username must be unique. When study is 'all' the username must be unique. Adding a row to PERMISSION can only increase a user's access. Permission is never taken away. So, in case of conflict between permission granted to all studies and permission granted to a specific study the user has the more permissive of the two. TIP: The contents of this table is accessible only to administrator and PLHDB manager accounts; use the PERMISSIONS view instead.

ColumnTypeComment
pidinteger Auto Increment [nextval('permission_pid_seq')]Unique row identifier. The value of this column is automatically assigned by the system; the normal practice, which results in a system generated id, is to omit this column when inserting new rows or to supply a NULL value. The value of this column cannot be NULL.
accesscharacter varying(10)The type of access granted. Must be one of: search = Can read study data; insert = search permissions + Can create new rows; edit = insert permissions + Can alter existing rows; all = edit permissions + Can delete existing rows.
studycharacter varying(12)The STUDY.Name of the study to which permission is granted or 'all' if permission is granted to all studies.
usernamenameThe ROLE.rolname of the user to which permission is granted. The value of this column cannot be changed. HINT: See the "accounts" view for information on users.

Indexes

PRIMARYpid
INDEXusername
UNIQUEusername, study

Foreign keys

Triggers

Language: