changes the returned key from UserID to id, in accordance with getUserData

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pull/16036/head
Arthur Schiwon 7 years ago
parent 9d121985dc
commit 99075825e3
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
  1. 2
      apps/provisioning_api/lib/Controller/UsersController.php
  2. 12
      apps/provisioning_api/tests/Controller/UsersControllerTest.php
  3. 8
      settings/js/vue-settings-apps-users-management.js
  4. 2
      settings/js/vue-settings-apps-users-management.js.map
  5. 2
      settings/src/store/users.js

@ -337,7 +337,7 @@ class UsersController extends AUserData {
}
}
return new DataResponse(['UserID' => $userid]);
return new DataResponse(['id' => $userid]);
} catch (HintException $e ) {
$this->logger->logException($e, [

@ -357,7 +357,7 @@ class UsersControllerTest extends TestCase {
->willReturn(true);
$this->assertTrue(key_exists(
'UserID',
'id',
$this->api->addUser('NewUser', 'PasswordOfTheNewUser')->getData()
));
}
@ -417,7 +417,7 @@ class UsersControllerTest extends TestCase {
->with('NewUser', 'display', 'DisplayNameOfTheNewUser');
$this->assertTrue(key_exists(
'UserID',
'id',
$api->addUser('NewUser', 'PasswordOfTheNewUser', 'DisplayNameOfTheNewUser')->getData()
));
}
@ -467,7 +467,7 @@ class UsersControllerTest extends TestCase {
->willReturnCallback(function() { return (string)rand(1000000000, 9999999999); });
$this->assertTrue(key_exists(
'UserID',
'id',
$this->api->addUser('', 'PasswordOfTheNewUser')->getData()
));
}
@ -556,7 +556,7 @@ class UsersControllerTest extends TestCase {
->willReturn(true);
$this->assertTrue(key_exists(
'UserID',
'id',
$this->api->addUser('NewUser', 'PasswordOfTheNewUser')->getData()
));
}
@ -617,7 +617,7 @@ class UsersControllerTest extends TestCase {
);
$this->assertTrue(key_exists(
'UserID',
'id',
$this->api->addUser('NewUser', 'PasswordOfTheNewUser', '', '', ['ExistingGroup'])->getData()
));
}
@ -838,7 +838,7 @@ class UsersControllerTest extends TestCase {
->willReturn(true);
$this->assertTrue(key_exists(
'UserID',
'id',
$this->api->addUser('NewUser', 'PasswordOfTheNewUser', '', '', ['ExistingGroup1', 'ExistingGroup2'])->getData()
));
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -429,7 +429,7 @@ const actions = {
addUser({commit, dispatch}, { userid, password, displayName, email, groups, subadmin, quota, language }) {
return api.requireAdmin().then((response) => {
return api.post(OC.linkToOCS(`cloud/users`, 2), { userid, password, displayName, email, groups, subadmin, quota, language })
.then((response) => dispatch('addUserData', userid || response.data.ocs.data.UserID))
.then((response) => dispatch('addUserData', userid || response.data.ocs.data.id))
.catch((error) => {throw error;});
}).catch((error) => {
commit('API_FAILURE', { userid, error });

Loading…
Cancel
Save