-
-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: drop release plan template view permissions (#9195)
https://linear.app/unleash/issue/2-3225/drop-the-release-template-view-permissions Drops the release plan template view permissions in favor of an "open by default" approach. Should merge the Enterprise PR first.
- Loading branch information
Showing
2 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
exports.up = (db, cb) => { | ||
db.runSql(` | ||
DELETE | ||
FROM permissions | ||
WHERE permission IN | ||
('RELEASE_PLAN_TEMPLATE_VIEW_OVERVIEW', 'RELEASE_PLAN_TEMPLATE_VIEW'); | ||
`, cb); | ||
|
||
}; | ||
|
||
exports.down = (db, cb) => { | ||
db.runSql(` | ||
INSERT INTO permissions(permission, display_name, type) VALUES | ||
('RELEASE_PLAN_TEMPLATE_VIEW_OVERVIEW', 'View overview of release plan templates', 'root'), | ||
('RELEASE_PLAN_TEMPLATE_VIEW', 'View details of specific release plan template', 'root'); | ||
INSERT INTO role_permission(role_id, permission, created_by_user_id) | ||
SELECT id, 'RELEASE_PLAN_TEMPLATE_VIEW_OVERVIEW', '-1337' FROM roles WHERE name IN ('Viewer', 'Editor') AND type = 'root'; | ||
INSERT INTO role_permission(role_id, permission, created_by_user_id) | ||
SELECT id, 'RELEASE_PLAN_TEMPLATE_VIEW', '-1337' FROM roles WHERE name = 'Editor' AND type = 'root'; | ||
`, cb); | ||
}; |