File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
database/migration/migrations Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ func Roles() map[string]RoleTemplate {
6767 permissions .AppReadApplicationConfiguration ,
6868 permissions .APsGenerateReport ,
6969 permissions .AuditLogRead ,
70- permissions .AuthCreateToken ,
7170 permissions .AuthManageSelf ,
7271 permissions .AuthReadUsers ,
7372 permissions .ClientsRead ,
Original file line number Diff line number Diff line change @@ -29,16 +29,15 @@ JOIN permissions p
2929 (' app' , ' ReadAppConfig' ),
3030 (' risks' , ' GenerateReport' ),
3131 (' audit_log' , ' Read' ),
32- (' auth' , ' CreateToken' ),
3332 (' auth' , ' ManageSelf' ),
3433 (' auth' , ' ReadUsers' ),
3534 (' graphdb' , ' Read' ),
3635 (' saved_queries' , ' Read' ),
3736 (' clients' , ' Read' )
38- )))
39- ON CONFLICT DO NOTHING;
40-
41- INSERT INTO roles_permissions (role_id, permission_id )
42- VALUES (( SELECT id FROM roles WHERE roles . name = ' Administrator ' ),
43- ( SELECT id FROM permissions WHERE permissions . authority = ' audit_log ' and permissions . name = ' Read ' ))
37+ ))
38+ OR
39+ ( r . name = ' Administrator ' AND ( p . authority , p . name ) IN (
40+ ( ' audit_log ' , ' Read ' )
41+ ))
42+ )
4443ON CONFLICT DO NOTHING;
You can’t perform that action at this time.
0 commit comments