Skip to content

Commit

Permalink
Permissions to view evidence were added(#1791) (#1806)
Browse files Browse the repository at this point in the history
Co-authored-by: Sergey Suvorov <[email protected]>

(cherry picked from commit 8b2dd76)
  • Loading branch information
ssuvorov-fls committed Feb 26, 2021
1 parent 8f1ea5e commit 611295a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
INSERT INTO ${ohdsiSchema}.sec_permission (id, value, description)
SELECT nextval('${ohdsiSchema}.sec_permission_id_seq'),'evidence:*:drugconditionpairs:post','Get drug condition pairs information';

INSERT INTO ${ohdsiSchema}.sec_role_permission (role_id, permission_id)
SELECT sr.id, sp.id
FROM ${ohdsiSchema}.sec_permission sp, ${ohdsiSchema}.sec_role sr
WHERE sp."value" in
(
'evidence:*:drugconditionpairs:post'
)
AND sr.name IN ('Atlas users');
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
INSERT INTO ${ohdsiSchema}.sec_permission (id, value, description)
SELECT NEXT VALUE FOR ${ohdsiSchema}.sec_permission_id_seq,'evidence:*:drugconditionpairs:post','Get drug condition pairs information';

INSERT INTO ${ohdsiSchema}.sec_role_permission (role_id, permission_id)
SELECT sr.id, sp.id
FROM ${ohdsiSchema}.sec_permission sp, ${ohdsiSchema}.sec_role sr
WHERE sp."value" in
(
'evidence:*:drugconditionpairs:post'
)
AND sr.name IN ('Atlas users');

0 comments on commit 611295a

Please sign in to comment.