Skip to content

Commit

Permalink
Add a migration to add the required permission for clearing the cache
Browse files Browse the repository at this point in the history
  • Loading branch information
amarsan committed Nov 14, 2024
1 parent 1e4dd19 commit e89e4ab
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
INSERT INTO ${ohdsiSchema}.sec_permission (id, value, description)
SELECT nextval('${ohdsiSchema}.sec_permission_id_seq'),
'cdmresults:clearcache:post',
'Clear the achilles and cdm results caches';

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
(
'cdmresults:clearcache:post'
)
AND sr.name IN ('admin');

0 comments on commit e89e4ab

Please sign in to comment.