oncall-engine/engine/apps
Joey Orlando babacf4da8
refactor the is_rbac_permissions_enabled check to be more robust (#1099)
# What this PR does
Checks the `is_rbac_permissions_enabled` flag differently based on
whether we are dealing with an open-source, or cloud installation:
- for open-source installations, simply continue making a `HEAD` request
to the list RBAC permissions Grafana API endpoint.
- for cloud installations, use the `config` object returned from `GET
/instances/{instance_id}?config=true` and check whether
`instance_info["config"]["feature_toggles"]["accessControlOnCall"] ==
"true"`

## Which issue(s) this PR fixes
Resolves the issue in hosted grafana where when a stack is inactive, the
hosted grafana gateway, returns 200 to the `HEAD` request (which
erroneously sets the `is_rbac_permissions_enabled` flag to `true`)

## Checklist

- [x] Tests updated (N/A)
- [ ] Documentation added
- [x] `CHANGELOG.md` updated
2023-01-11 12:48:30 +01:00
..
alerts Simplify and speed up slack rendering (#1105) 2023-01-10 15:41:38 +08:00
api Update schedules query not to defer ical fields used for on-call check (#1114) 2023-01-09 14:10:23 -03:00
api_for_grafana_incident World, meet OnCall! 2022-06-03 08:09:47 -06:00
auth_token Org soft-delete (#1073) 2023-01-05 12:42:55 +08:00
base Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
email Allow no-auth SMTP connection for email notifications (#759) 2022-11-03 16:18:37 +00:00
grafana_plugin refactor the is_rbac_permissions_enabled check to be more robust (#1099) 2023-01-11 12:48:30 +01:00
heartbeat Insight logs (#348) 2022-08-24 12:04:44 +05:00
integrations Org soft-delete (#1073) 2023-01-05 12:42:55 +08:00
mobile_app Re-implement FCM relay after introducing firebase (#1121) 2023-01-11 11:42:01 +00:00
oss_installation Add RBAC Support (#777) 2022-11-29 09:41:56 +01:00
public_api Org soft-delete (#1073) 2023-01-05 12:42:55 +08:00
schedules Schedule score backend (#338) 2023-01-04 16:49:58 +00:00
slack Catch DoesNotExist in post_slack_rate_limit_message (#1067) 2023-01-03 17:44:56 +00:00
social_auth Support of oncall-gw (#741) 2022-11-08 14:43:22 +08:00
telegram remove send_link_to_channel_message_or_fallback_to_full_incident 2023-01-06 11:34:11 +00:00
twilioapp Add simple check if using API key instead of AUTH token 2022-11-09 21:52:42 -07:00
user_management refactor the is_rbac_permissions_enabled check to be more robust (#1099) 2023-01-11 12:48:30 +01:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00