oncall-engine/engine/apps
Joey Orlando 04ab676463
feat: update RBAC permissioning to support grafana-irm-app (#5149)
# What this PR does

Closes https://github.com/grafana/irm/issues/31 (and supersedes
https://github.com/grafana/oncall/pull/4784)

Main changes:
- updates `apps.api.permissions.user_is_authorized` to check the value
of `organization.is_grafana_irm_enabled`. If it is, we check for the
presence of `grafana-irm-app` prefixed RBAC permissions rather than
`grafana-oncall-app`
- cleans-up `engine/apps/api/tests/test_permissions.py` (bulk of the
changes in the PR)
- converts `apps.user_management.models.User.build_permissions_query` to
a `UserQuerySet` method instead
  - means we can now do things like this instead:
  ```python3

User.objects.filter_by_permission(RBACPermission.Permissions.NOTIFICATIONS_READ,
organization)
  ```

## 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] Added the relevant release notes label (see labels prefixed w/
`release:`). These labels dictate how your PR will
    show up in the autogenerated release notes.
2024-10-10 19:02:21 +00:00
..
alerts Fix retrying tasks (#5160) 2024-10-10 15:37:30 +00:00
api feat: update RBAC permissioning to support grafana-irm-app (#5149) 2024-10-10 19:02:21 +00:00
api_for_grafana_incident Allow valid URLs for web image_url template (#5150) 2024-10-10 13:21:36 +00:00
auth_token feat: update RBAC permissioning to support grafana-irm-app (#5149) 2024-10-10 19:02:21 +00:00
base Speed up internal api endpoints (#4830) 2024-08-15 14:20:55 +00:00
chatops_proxy update URLs constructed by the backend to support IRM plugin (#5137) 2024-10-09 08:55:10 -04:00
email Make cloud email domain configurable (#4982) 2024-09-04 14:46:52 +00:00
exotel Add method to send notification bundle by SMS (#4624) 2024-07-16 14:20:16 +00:00
google address Google OAuth2 issues where user didn't grant us the https://www.googleapis.com/auth/calendar.events.readonly scope (#4802) 2024-08-14 18:02:34 -04:00
grafana_plugin feat: update RBAC permissioning to support grafana-irm-app (#5149) 2024-10-10 19:02:21 +00:00
heartbeat Improve OpenAPI schema coverage (#3629) 2024-01-12 15:11:22 +00:00
integrations Use dataclass methods in custom ratelimits and fix tests (#5036) 2024-09-18 13:32:16 +00:00
labels fix: update internal labels endpoints to work with RBAC (#5099) 2024-10-02 17:39:49 +00:00
metrics_exporter Split up organizations across metrics exporters (#5127) 2024-10-08 17:29:36 +00:00
mobile_app Update schedule related users to use cached final representation (#5101) 2024-10-01 13:37:28 +00:00
oss_installation feat: update RBAC permissioning to support grafana-irm-app (#5149) 2024-10-10 19:02:21 +00:00
phone_notifications Add method to send notification bundle by SMS (#4624) 2024-07-16 14:20:16 +00:00
public_api update URLs constructed by the backend to support IRM plugin (#5137) 2024-10-09 08:55:10 -04:00
schedules feat: update RBAC permissioning to support grafana-irm-app (#5149) 2024-10-10 19:02:21 +00:00
slack feat: update RBAC permissioning to support grafana-irm-app (#5149) 2024-10-10 19:02:21 +00:00
social_auth update URLs constructed by the backend to support IRM plugin (#5137) 2024-10-09 08:55:10 -04:00
telegram Handle Slack invalid_auth error when posting alert group notification (#4970) 2024-09-02 16:37:27 +00:00
twilioapp Add method to send notification bundle by SMS (#4624) 2024-07-16 14:20:16 +00:00
user_management feat: update RBAC permissioning to support grafana-irm-app (#5149) 2024-10-10 19:02:21 +00:00
webhooks Add manual trigger support for webhooks (#4934) 2024-09-09 12:17:23 +00:00
zvonok Add method to send notification bundle by SMS (#4624) 2024-07-16 14:20:16 +00:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00