Skip to content

Commit

Permalink
chore: add project-specific-segment permission (#3295)
Browse files Browse the repository at this point in the history
## 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
gastonfournier committed Mar 10, 2023
1 parent 3956a85 commit fecbdd4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/types/permissions.ts
Expand Up @@ -39,6 +39,7 @@ export const MOVE_FEATURE_TOGGLE = 'MOVE_FEATURE_TOGGLE';
export const CREATE_SEGMENT = 'CREATE_SEGMENT';
export const UPDATE_SEGMENT = 'UPDATE_SEGMENT';
export const DELETE_SEGMENT = 'DELETE_SEGMENT';
export const UPDATE_PROJECT_SEGMENT = 'UPDATE_PROJECT_SEGMENT';
export const APPROVE_CHANGE_REQUEST = 'APPROVE_CHANGE_REQUEST';
export const APPLY_CHANGE_REQUEST = 'APPLY_CHANGE_REQUEST';
export const SKIP_CHANGE_REQUEST = 'SKIP_CHANGE_REQUEST';
Expand Down
14 changes: 14 additions & 0 deletions src/migrations/20230309174400-add-project-segment-permission.js
@@ -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,
);
};

0 comments on commit fecbdd4

Please sign in to comment.