Przeglądaj źródła

Fix translation of user exists error server-side

Signed-off-by: Christopher Ng <chrng8@gmail.com>
tags/v25.0.0beta7
Christopher Ng 1 rok temu
rodzic
commit
8a15c629e2

+ 1
- 1
apps/provisioning_api/lib/Controller/UsersController.php Wyświetl plik

@@ -350,7 +350,7 @@ class UsersController extends AUserData {

if ($this->userManager->userExists($userid)) {
$this->logger->error('Failed addUser attempt: User already exists.', ['app' => 'ocs_api']);
throw new OCSException('User already exists', 102);
throw new OCSException($this->l10nFactory->get('provisioning_api')->t('User already exists'), 102);
}

if ($groups !== []) {

+ 0
- 8
apps/settings/src/store/users.js Wyświetl plik

@@ -30,7 +30,6 @@ import api from './api'
import axios from '@nextcloud/axios'
import { generateOcsUrl } from '@nextcloud/router'
import logger from '../logger'
import { showError } from '@nextcloud/dialogs'

const orderGroups = function(groups, orderBy) {
/* const SORT_USERCOUNT = 1;
@@ -553,13 +552,6 @@ const actions = {
.then((response) => dispatch('addUserData', userid || response.data.ocs.data.id))
.catch((error) => { throw error })
}).catch((error) => {
const statusCode = error?.response?.data?.ocs?.meta?.statuscode

if (statusCode === 102) {
showError(t('settings', 'User already exists.'))
throw error
}

commit('API_FAILURE', { userid, error })
throw error
})

+ 2
- 2
dist/settings-vue-settings-apps-users-management.js
Plik diff jest za duży
Wyświetl plik


+ 1
- 1
dist/settings-vue-settings-apps-users-management.js.map
Plik diff jest za duży
Wyświetl plik


Ładowanie…
Anuluj
Zapisz