Browse Source

Set display name (if specified) when a new user is created

Although the form to create a new user included a field to set the
display name its value was not taken into account, so the new user ended
with the default display name (the same as the user name).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
tags/v14.0.0beta2
Daniel Calviño Sánchez 6 years ago
parent
commit
ab6688fe0b

+ 8
- 8
settings/js/settings-vue.js
File diff suppressed because it is too large
View File


+ 1
- 1
settings/js/settings-vue.js.map
File diff suppressed because it is too large
View File


+ 1
- 0
settings/src/components/userList.vue View File

@@ -324,6 +324,7 @@ export default {
this.$store.dispatch('addUser', {
userid: this.newUser.id,
password: this.newUser.password,
displayName: this.newUser.displayName,
email: this.newUser.mailAddress,
groups: this.newUser.groups.map(group => group.id),
subadmin: this.newUser.subAdminsGroups.map(group => group.id),

+ 4
- 3
settings/src/store/users.js View File

@@ -415,16 +415,17 @@ const actions = {
* @param {Object} context
* @param {Object} options
* @param {string} options.userid User id
* @param {string} options.password User password
* @param {string} options.password User password
* @param {string} options.displayName User display name
* @param {string} options.email User email
* @param {string} options.groups User groups
* @param {string} options.subadmin User subadmin groups
* @param {string} options.quota User email
* @returns {Promise}
*/
addUser({commit, dispatch}, { userid, password, email, groups, subadmin, quota, language }) {
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, email, groups, subadmin, quota, language })
return api.post(OC.linkToOCS(`cloud/users`, 2), { userid, password, displayName, email, groups, subadmin, quota, language })
.then((response) => dispatch('addUserData', userid))
.catch((error) => {throw error;});
}).catch((error) => commit('API_FAILURE', { userid, error }));

Loading…
Cancel
Save