Skip to content

Commit

Permalink
let mobile app use escalation options endpoints (#3847)
Browse files Browse the repository at this point in the history
# What this PR does

## Which issue(s) this PR fixes

## 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)
  • Loading branch information
imtoori authored Feb 7, 2024
1 parent 954d416 commit 47768f0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Changed

- Allow mobile app to access escalation options endpoints @imtoori ([#3847](https://github.com/grafana/oncall/pull/3847))

## v1.3.102 (2024-02-06)

### Fixed
Expand Down
6 changes: 5 additions & 1 deletion engine/apps/api/views/escalation_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
EscalationPolicyUpdateSerializer,
)
from apps.auth_token.auth import PluginAuthentication
from apps.mobile_app.auth import MobileAppAuthTokenAuthentication
from common.api_helpers.mixins import (
CreateSerializerMixin,
PublicPrimaryKeyMixin,
Expand All @@ -29,7 +30,10 @@ class EscalationPolicyView(
UpdateSerializerMixin,
OrderedModelViewSet,
):
authentication_classes = (PluginAuthentication,)
authentication_classes = (
MobileAppAuthTokenAuthentication,
PluginAuthentication,
)
permission_classes = (IsAuthenticated, RBACPermission)
rbac_permissions = {
"metadata": [RBACPermission.Permissions.ESCALATION_CHAINS_READ],
Expand Down

0 comments on commit 47768f0

Please sign in to comment.