Skip to content

Commit

Permalink
fix: update types for access-tokens permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
VikaCep committed Nov 19, 2024
1 parent fcfd26a commit e9c3969
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/hooks/useUserPermissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export const getUserPermissions = () => {
canReadThresholds: isUserActionAllowed('grafana-synthetic-monitoring-app.thresholds:read', OrgRole.Viewer),
canWriteThresholds: isUserActionAllowed('grafana-synthetic-monitoring-app.thresholds:write', OrgRole.Editor),

canReadTokens: isUserActionAllowed('grafana-synthetic-monitoring-app.tokens:read', OrgRole.Viewer),
canWriteTokens: isUserActionAllowed('grafana-synthetic-monitoring-app.tokens:write', OrgRole.Editor),
canReadTokens: isUserActionAllowed('grafana-synthetic-monitoring-app.access-tokens:read', OrgRole.Viewer),
canWriteTokens: isUserActionAllowed('grafana-synthetic-monitoring-app.access-tokens:write', OrgRole.Editor),
canDeleteTokens: isUserActionAllowed('grafana-synthetic-monitoring-app.tokens:delete', OrgRole.Editor),

canEnablePlugin: isUserActionAllowed('grafana-synthetic-monitoring-app.plugin:enable', OrgRole.Admin),
Expand Down
5 changes: 2 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -846,10 +846,9 @@ export type PluginPermissions =
| 'grafana-synthetic-monitoring-app.alerts:delete'
| 'grafana-synthetic-monitoring-app.thresholds:read'
| 'grafana-synthetic-monitoring-app.thresholds:write'
| 'grafana-synthetic-monitoring-app.access-tokens:create'
| 'grafana-synthetic-monitoring-app.access-tokens:read'
| 'grafana-synthetic-monitoring-app.access-tokens:write'
| 'grafana-synthetic-monitoring-app.access-tokens:delete'
| 'grafana-synthetic-monitoring-app.plugin:enable'
| 'grafana-synthetic-monitoring-app.plugin:disable'
| 'grafana-synthetic-monitoring-app.tokens:write'
| 'grafana-synthetic-monitoring-app.tokens:read'
| 'grafana-synthetic-monitoring-app.tokens:delete';

0 comments on commit e9c3969

Please sign in to comment.