allow mobile app to consume internal schedules api endpoints (#2109)
# What this PR does allow mobile app to consume internal schedules api endpoints ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [ ] 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)
This commit is contained in:
parent
bc535ac5df
commit
0a78b99fd8
2 changed files with 9 additions and 1 deletions
|
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## Unreleased
|
||||
|
||||
### Added
|
||||
|
||||
- Allow mobile app to consume "internal" schedules API endpoints by @joeyorlando ([#2109](https://github.com/grafana/oncall/pull/2109))
|
||||
|
||||
## v1.2.39 (2023-06-06)
|
||||
|
||||
### Changed
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ from apps.api.serializers.user import ScheduleUserSerializer
|
|||
from apps.auth_token.auth import PluginAuthentication
|
||||
from apps.auth_token.constants import SCHEDULE_EXPORT_TOKEN_NAME
|
||||
from apps.auth_token.models import ScheduleExportAuthToken
|
||||
from apps.mobile_app.auth import MobileAppAuthTokenAuthentication
|
||||
from apps.schedules.models import OnCallSchedule
|
||||
from apps.slack.models import SlackChannel
|
||||
from apps.slack.tasks import update_slack_user_group_for_schedules
|
||||
|
|
@ -72,7 +73,10 @@ class ScheduleView(
|
|||
ModelViewSet,
|
||||
mixins.ListModelMixin,
|
||||
):
|
||||
authentication_classes = (PluginAuthentication,)
|
||||
authentication_classes = (
|
||||
MobileAppAuthTokenAuthentication,
|
||||
PluginAuthentication,
|
||||
)
|
||||
permission_classes = (IsAuthenticated, RBACPermission)
|
||||
rbac_permissions = {
|
||||
"metadata": [RBACPermission.Permissions.SCHEDULES_READ],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue