Use UserSettingsWrite instead of OtherSettingsWrite for phone tab (#2772)

# What this PR does

Sets the correct permission when accessing Phone Verification screen
(Cloud/OSS)

## Which issue(s) this PR fixes

Fix for https://github.com/grafana/oncall/issues/2761

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
This commit is contained in:
Rares Mardare 2023-08-10 09:35:32 +03:00 committed by GitHub
parent fd19dd422a
commit e87bb912ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View file

@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Do not show override shortcut when web overrides are disabled ([#2745](https://github.com/grafana/oncall/pull/2745)) - Do not show override shortcut when web overrides are disabled ([#2745](https://github.com/grafana/oncall/pull/2745))
- Handle ical schedule import with duplicated event UIDs ([#2760](https://github.com/grafana/oncall/pull/2760)) - Handle ical schedule import with duplicated event UIDs ([#2760](https://github.com/grafana/oncall/pull/2760))
- Allow Editor to access Phone Verification ([#2772](https://github.com/grafana/oncall/pull/2772))
## v1.3.22 (2023-08-03) ## v1.3.22 (2023-08-03)

View file

@ -112,7 +112,7 @@ const CloudPhoneSettings = observer((props: CloudPhoneSettingsProps) => {
return ( return (
<WithPermissionControlDisplay <WithPermissionControlDisplay
userAction={UserActions.OtherSettingsWrite} userAction={UserActions.UserSettingsWrite}
title="OnCall uses Grafana Cloud for SMS and phone call notifications" title="OnCall uses Grafana Cloud for SMS and phone call notifications"
> >
<VerticalGroup spacing="lg"> <VerticalGroup spacing="lg">

View file

@ -188,7 +188,7 @@ const PhoneVerification = observer((props: PhoneVerificationProps) => {
} }
return ( return (
<WithPermissionControlDisplay userAction={UserActions.OtherSettingsWrite}> <WithPermissionControlDisplay userAction={UserActions.UserSettingsWrite}>
<VerticalGroup> <VerticalGroup>
{isPhoneValid && !user.verified_phone_number && ( {isPhoneValid && !user.verified_phone_number && (
<Alert severity="info" title="You will receive alerts to a new number after verification" /> <Alert severity="info" title="You will receive alerts to a new number after verification" />