aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/src
diff options
context:
space:
mode:
authorGrigorii K. Shartsev <me@shgk.me>2023-10-19 16:42:36 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2023-10-20 20:31:57 +0200
commit641d52dae7af36ef447dc7bf85fbad656400da12 (patch)
tree5889b36179ff3ecfd68585c7858f3bb578bd33d6 /apps/settings/src
parentd4c37d5c4c7e972192517967ef8d02e2588b80c3 (diff)
downloadnextcloud-server-641d52dae7af36ef447dc7bf85fbad656400da12.tar.gz
nextcloud-server-641d52dae7af36ef447dc7bf85fbad656400da12.zip
fix(settings): remove unused savePrimaryEmailScope on Personal Settings page
If was replaced with universal `savePrimaryAccountPropertyScope`. `<HeaderBar>` has no `handle-scope-change` prop. Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Diffstat (limited to 'apps/settings/src')
-rw-r--r--apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue4
-rw-r--r--apps/settings/src/service/PersonalInfo/EmailService.js20
2 files changed, 1 insertions, 23 deletions
diff --git a/apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue b/apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue
index c977ef54e96..0cc94b4998a 100644
--- a/apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue
+++ b/apps/settings/src/components/PersonalInfo/EmailSection/EmailSection.vue
@@ -24,7 +24,6 @@
<section>
<HeaderBar :input-id="inputId"
:readable="primaryEmail.readable"
- :handle-scope-change="savePrimaryEmailScope"
:is-editable="true"
:is-multi-value-supported="true"
:is-valid-section="isValidSection"
@@ -69,7 +68,7 @@ import Email from './Email.vue'
import HeaderBar from '../shared/HeaderBar.vue'
import { ACCOUNT_PROPERTY_READABLE_ENUM, DEFAULT_ADDITIONAL_EMAIL_SCOPE, NAME_READABLE_ENUM } from '../../../constants/AccountPropertyConstants.js'
-import { savePrimaryEmail, savePrimaryEmailScope, removeAdditionalEmail } from '../../../service/PersonalInfo/EmailService.js'
+import { savePrimaryEmail, removeAdditionalEmail } from '../../../service/PersonalInfo/EmailService.js'
import { validateEmail } from '../../../utils/validate.js'
import { handleError } from '../../../utils/handlers.js'
@@ -90,7 +89,6 @@ export default {
additionalEmails: additionalEmails.map(properties => ({ ...properties, key: this.generateUniqueKey() })),
displayNameChangeSupported,
primaryEmail: { ...primaryEmail, readable: NAME_READABLE_ENUM[primaryEmail.name] },
- savePrimaryEmailScope,
notificationEmail,
}
},
diff --git a/apps/settings/src/service/PersonalInfo/EmailService.js b/apps/settings/src/service/PersonalInfo/EmailService.js
index 535bd6a2295..f8256f0bdc0 100644
--- a/apps/settings/src/service/PersonalInfo/EmailService.js
+++ b/apps/settings/src/service/PersonalInfo/EmailService.js
@@ -132,26 +132,6 @@ export const updateAdditionalEmail = async (prevEmail, newEmail) => {
}
/**
- * Save the federation scope for the primary email of the user
- *
- * @param {string} scope the federation scope
- * @return {object}
- */
-export const savePrimaryEmailScope = async (scope) => {
- const userId = getCurrentUser().uid
- const url = generateOcsUrl('cloud/users/{userId}', { userId })
-
- await confirmPassword()
-
- const res = await axios.put(url, {
- key: `${ACCOUNT_PROPERTY_ENUM.EMAIL}${SCOPE_SUFFIX}`,
- value: scope,
- })
-
- return res.data
-}
-
-/**
* Save the federation scope for the additional email of the user
*
* @param {string} email the additional email