-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add genai user role to rbac (#9206)
- Loading branch information
1 parent
43289e9
commit 39b948c
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
master/static/migrations/20240418155114_add-genai-role.tx.down.sql
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,3 @@ | ||
DELETE FROM roles WHERE id = 8; | ||
|
||
DELETE FROM permission_assignments WHERE role_id = 8; |
30 changes: 30 additions & 0 deletions
30
master/static/migrations/20240418155114_add-genai-role.tx.up.sql
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,30 @@ | ||
INSERT INTO roles(id, role_name) VALUES | ||
(8, 'GenAIUser'); | ||
|
||
INSERT INTO permission_assignments(permission_id, role_id) | ||
SELECT id AS permission_id, 8 FROM permissions WHERE name IN ( | ||
'create experiment', | ||
'view experiment artifacts', | ||
'view experiment metadata', | ||
'update experiment', | ||
'update experiment metadata', | ||
'delete experiment', | ||
'create notebooks/shells/commands', | ||
'view notebooks/shells/commands', | ||
'update notebooks/shells/commands', | ||
'create workspace', | ||
'view workspace', | ||
'create project', | ||
'view project', | ||
'update project', | ||
'delete project', | ||
'view model registry', | ||
'edit model registry', | ||
'create model registry', | ||
'delete model registry', | ||
'delete model version', | ||
'view templates', | ||
'update templates', | ||
'create templates', | ||
'delete templates' | ||
); |