Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add project-specific-segment permission (#3295)
## About the changes This adds new permission to control access to project specific segments This should be used later for https://linear.app/unleash/issue/2-743/have-a-project-specific-configuration-section: ![image (11)](https://user-images.githubusercontent.com/455064/224277399-338ed0e6-f5e3-4318-a2cd-ac1300b60603.png)
- Loading branch information
1 parent
3956a85
commit fecbdd4
Showing
2 changed files
with
15 additions
and
0 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
14 changes: 14 additions & 0 deletions
14
src/migrations/20230309174400-add-project-segment-permission.js
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,14 @@ | ||
exports.up = function (db, cb) { | ||
db.runSql( | ||
`INSERT INTO permissions (permission, display_name, type) VALUES | ||
('UPDATE_PROJECT_SEGMENT', 'Create/edit project segment', 'project');`, | ||
cb, | ||
); | ||
}; | ||
|
||
exports.down = function (db, cb) { | ||
db.runSql( | ||
`DELETE FROM permissions WHERE permission = 'UPDATE_PROJECT_SEGMENT';`, | ||
cb, | ||
); | ||
}; |