oncall-engine/engine/apps/user_management
Joey Orlando b260a8e82b
fix: address RBAC Admin issue (#5087)
# What this PR does

**NOTE**: should be merged/released after
https://github.com/grafana/irm/pull/183 has been rolled out to most
stacks (as that frontend update is what will grant that new RBAC
"action" to users whom already have the "OnCall Admin" RBAC role
assigned)

tldr; from the comment in the `RBACPermission.Permission.ADMIN` comment
in `engine/apps/api/permissions.py`:

> NOTE: this is a bit of a hack for now. See
https://github.com/grafana/support-escalations/issues/12625
> Basically when it comes to filtering teams that are configured to
share their resources with
> "Team members and admins", we have no way of knowing, when a user is
ACTUALLY an Admin when RBAC is involed.
>
> Example: Take a user with the basic role of None/Editor/Viewer but
with the "OnCall Admin" role assigned.
> Without this RBAC permission, we have no way of knowing that the user
is ACTUALLY an "Admin".

## Which issue(s) this PR closes

Closes https://github.com/grafana/support-escalations/issues/12625

## 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-09-26 12:40:07 -04:00
..
migrations Fix team uniqueness db migration (#4416) 2024-05-28 19:41:42 +00:00
models fix: address RBAC Admin issue (#5087) 2024-09-26 12:40:07 -04:00
subscription_strategy Speed up send email notification task (#3713) 2024-01-18 13:54:18 +00:00
tests fix: address RBAC Admin issue (#5087) 2024-09-26 12:40:07 -04:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
apps.py Update ical event/user email matching to be case-insensitive 2022-10-20 16:12:41 -03:00
constants.py Google OAuth2 flow + fetch Google Calendar OOO events (#4067) 2024-04-02 14:59:03 -04:00
exceptions.py Org soft-delete (#1073) 2023-01-05 12:42:55 +08:00
middlewares.py Handle Amazon SNS headers for moved (#3371) 2023-11-16 13:44:56 -07:00
signals.py add several new database columns + emit two new Django signals (#1522) 2023-04-14 09:15:57 +02:00
sync.py Make sure organization token is valid before sync (#4904) 2024-08-22 17:49:22 +00:00
types.py Google OAuth2 flow + fetch Google Calendar OOO events (#4067) 2024-04-02 14:59:03 -04:00
user_representative.py apps.get_model -> import (#2619) 2023-07-25 09:43:23 +00:00