Skip to content

Commit

Permalink
feat: migration script to add generate:SOURCE:get permission to role 15
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterlukasse committed Jun 17, 2024
1 parent bde7f91 commit 28bc22d
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,23 @@ with vocab_source as (
(':access')
) t33 (rs)
) combined
),
generate_perms as (
select distinct concat(lg,mg,rg) perm
from (
select *
from (values
('cohortdefinition:*:generate:')
) t111 (lg)
cross join
( select source_key
from vocab_source
) t222 (mg)
cross join
(values
(':get')
) t333 (rg)
) combined
)
SELECT DISTINCT 15 role_id, permission_id
FROM ${ohdsiSchema}.sec_role_permission srp
Expand All @@ -63,6 +80,8 @@ SELECT DISTINCT 15 role_id, permission_id
sp.value IN (select perm from vocab_perms)
or
sp.value IN (select perm from source_perms)
or
sp.value IN (select perm from generate_perms)
or
sp.value IN
(
Expand Down

0 comments on commit 28bc22d

Please sign in to comment.