-
Notifications
You must be signed in to change notification settings - Fork 299
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
add rbac_permissions to current-user response + rbac_enabled to current-org response #2611
add rbac_permissions to current-user response + rbac_enabled to current-org response #2611
Conversation
endpoint response schemas
@imtoori you can use these as such:
{
"pk": "OJLC8P3BPHABN",
"name": "Self-Hosted Organization",
"slack_team_identity": null,
"slack_channel": null,
"rbac_enabled": true,
"is_resolution_note_required": false,
"env_status": {
"telegram_configured": true,
"phone_provider": {
"configured": true,
"test_sms": false,
"test_call": true,
"verification_call": false,
"verification_sms": true
}
},
"banner": {
"body": null,
"title": null
}
}
{
...<other stuff>
"role": 0,
"rbac_permissions": [
{
"action": "grafana-oncall-app.alert-groups:read"
},
{
"action": "grafana-oncall-app.alert-groups:write"
},
...<big list of permissions>
]
} |
…ub.com:grafana/oncall into jorlando/add-rbac-permissions-to-user-response
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@joeyorlando I think |
I like this idea, especially because it's easier to deprecate |
@@ -106,5 +108,3 @@ | |||
path(r"login/<backend>/", auth.overridden_login_slack_auth, name="slack-auth"), | |||
path(r"complete/<backend>/", auth.overridden_complete_slack_auth, name="complete-slack-auth"), | |||
] | |||
|
|||
urlpatterns += router.urls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line is essentially a duplicate of line 69 and can be removed:
@grafana/grafana-oncall-frontend can I get some 👀 ? the main changes here are renaming |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved from TeamStore
. There were a few things on TeamStore
that were also removed as they were no longer used:
@observable
redirectingToProperTeam = false;
@observable.shallow
teams: { [id: number]: Team[] } = {};
|
||
constructor(rootStore: RootStore) { | ||
super(rootStore); | ||
this.path = '/organization/'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was changed from /current_team/
, see this change on the backend
channel_chat_id: string; | ||
channel_name: string; | ||
discussion_group_chat_id: number; // TODO check if string | ||
discussion_group_chat_id: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these two changed fields are actually string
s (verified on the backend)
@@ -36,7 +35,6 @@ export interface User { | |||
slack_login: string; | |||
} | null; | |||
post_onboarding_entry_allowed: any; | |||
teams: Team[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not used
userStore: UserStore = new UserStore(this); | ||
cloudStore: CloudStore = new CloudStore(this); | ||
directPagingStore: DirectPagingStore = new DirectPagingStore(this); | ||
grafanaTeamStore: GrafanaTeamStore = new GrafanaTeamStore(this); | ||
alertReceiveChannelStore: AlertReceiveChannelStore = new AlertReceiveChannelStore(this); | ||
outgoingWebhookStore: OutgoingWebhookStore = new OutgoingWebhookStore(this); | ||
|
||
outgoingWebhook2Store: OutgoingWebhook2Store = new OutgoingWebhook2Store(this); | ||
alertReceiveChannelFiltersStore: AlertReceiveChannelFiltersStore = new AlertReceiveChannelFiltersStore(this); | ||
escalationChainStore: EscalationChainStore = new EscalationChainStore(this); | ||
escalationPolicyStore: EscalationPolicyStore = new EscalationPolicyStore(this); | ||
teamStore: TeamStore = new TeamStore(this); | ||
telegramChannelStore: TelegramChannelStore = new TelegramChannelStore(this); | ||
slackStore: SlackStore = new SlackStore(this); | ||
slackChannelStore: SlackChannelStore = new SlackChannelStore(this); | ||
heartbeatStore: HeartbeatStore = new HeartbeatStore(this); | ||
scheduleStore: ScheduleStore = new ScheduleStore(this); | ||
userGroupStore: UserGroupStore = new UserGroupStore(this); | ||
alertGroupStore: AlertGroupStore = new AlertGroupStore(this); | ||
resolutionNotesStore: ResolutionNotesStore = new ResolutionNotesStore(this); | ||
apiTokenStore: ApiTokenStore = new ApiTokenStore(this); | ||
globalSettingStore: GlobalSettingStore = new GlobalSettingStore(this); | ||
filtersStore: FiltersStore = new FiltersStore(this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typing here is redundant. these attributes are properly typed w/o the explicit typing.
…nt-org response (#2611) # What this PR does unblocks grafana/oncall-mobile-app#152 ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required)
What this PR does
unblocks https://github.com/grafana/oncall-mobile-app/issues/152
Checklist
pr:no public docs
PR label added if not required)CHANGELOG.md
updated (orpr:no changelog
PR label added if not required)