RBAC Diagram+PostgreSQL Generator #21

Merged
hsh-michaelhoennig merged 54 commits from experimental-rbacview-generator into master 2024-03-11 12:30:44 +01:00
Showing only changes of commit d71d0215ec - Show all commits

View File

@ -357,25 +357,23 @@ create trigger deleteRbacRolesOfRbacObject_Trigger
*/
create domain RbacOp as varchar(67) -- TODO: shorten to 8, once the deprecated values are gone
-- FIXME:
-- check (
-- VALUE = 'DELETE'
-- or VALUE = 'UPDATE'
-- or VALUE = 'SELECT'
-- or VALUE = 'INSERT'
-- or VALUE = 'ASSUME'
-- -- TODO: all values below are deprecated, use insert with table
-- or VALUE ~ '^add-[a-z]+$'
-- or VALUE ~ '^new-[a-z-]+$'
-- )
;
check (
VALUE = 'DELETE'
or VALUE = 'UPDATE'
or VALUE = 'SELECT'
or VALUE = 'INSERT'
or VALUE = 'ASSUME'
-- TODO: all values below are deprecated, use insert with table
or VALUE ~ '^add-[a-z]+$'
or VALUE ~ '^new-[a-z-]+$'
);
create table RbacPermission
(
uuid uuid primary key references RbacReference (uuid) on delete cascade,
objectUuid uuid not null references RbacObject,
op RbacOp not null,
opTableName RbacOp,
opTableName varchar(60),
unique (objectUuid, op)
);