You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the PERMISSION table is very simplistic:
erDiagram
PERMISSION {
BIGINT ID PK
TEXT NAME
TEXT DESCRIPTION
}
Loading
Available permissions are defined in the Permissions class.
Proposed Behavior
Normalize the permission model, such that subject and verb are separated:
erDiagram
PERMISSION {
BIGINT ID PK
TEXT SUBJECT
TEXT VERB
}
Loading
The following legacy permissions:
PORTFOLIO_MANAGEMENT
PORTFOLIO_MANAGEMENT_CREATE
PORTFOLIO_MANAGEMENT_READ
PORTFOLIO_MANAGEMENT_UPDATE
PORTFOLIO_MANAGEMENT_DELETE
Would translate to:
SUBJECT
VERB
PORTFOLIO
ALL
PORTFOLIO
CREATE
PORTFOLIO
READ
PORTFOLIO
UPDATE
PORTFOLIO
DELETE
We could further assign ranks to each verb, such that UPDATE implies READ, and ALL implies all verbs. This could be achieved by defining verbs in an enum, or a separate VERB table.
With the above in place, queries could use efficient "has at least verb X on subject Y" predicates. This roughly resembles GitLab's model of "access levels" (see DependencyTrack/hyades#1632 (comment)).
Current Behavior
Currently, the
PERMISSIONtable is very simplistic:erDiagram PERMISSION { BIGINT ID PK TEXT NAME TEXT DESCRIPTION }Available permissions are defined in the
Permissionsclass.Proposed Behavior
Normalize the permission model, such that subject and verb are separated:
erDiagram PERMISSION { BIGINT ID PK TEXT SUBJECT TEXT VERB }The following legacy permissions:
Would translate to:
We could further assign ranks to each verb, such that
UPDATEimpliesREAD, andALLimplies all verbs. This could be achieved by defining verbs in an enum, or a separate VERB table.With the above in place, queries could use efficient "has at least verb X on subject Y" predicates. This roughly resembles GitLab's model of "access levels" (see DependencyTrack/hyades#1632 (comment)).
Checklist