-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change mapping of permission NOTIFICATIONS_READ to legacy role #5358
base: dev
Are you sure you want to change the base?
Conversation
Guys, could you take a look? |
Hey, I see your point. But if you allow |
The reasons make sense, although we use Grafana oncall mostly as an engine for Schedules. None of actual actions are expected from users. I think adding |
Added. I've found a block of settings with FEATURE_ prefix. I suppose the setting also may be considered as a FEATURE. |
We've also encountered a problem here and moving users to editors only to let them be part of schedule isn't an option. Would love to have this merged |
Ok, but I think if we have this toggle to enable Viewers to be on-call, we should allow them to perform all on-call related actions (so I would expect them to have the same perms as the OnCaller role we have defined), to have a more reusable/generally useful approach, makes sense? |
I've added dynamic definition of Permission class based on feature toggle. I think this looks better then 5 If/else. @matiasb wdyt? |
The problem the PR solves is a user must have
EDITOR
role in Grafana to be included into a Schedule.If we compare other
_READ
level privileges with their legacy roles, they are mapped toVIEWER
role (except API keys read).In short, the main idea of this change is to avoid granting a user
EDITOR
role in a whole organization only because a user should be a part of some Schedule.What this PR does
This PR changes a mapping of
NOTIFICATIONS_READ
permission fromEDITOR
toVIEWER
role.Which issue(s) this PR closes
Checklist
pr:no public docs
PR label added if not required)release:
). These labels dictate how your PR willshow up in the autogenerated release notes.