Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion settings/js/3.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/js/4.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/js/settings-admin-security.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/js/settings-vue.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/js/settings-vue.js.map

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions settings/src/store/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const mutations = {
state.orderBy = orderBy;
state.userCount = userCount;
state.groups = orderGroups(state.groups, state.orderBy);

},
addGroup(state, {gid, displayName}) {
try {
Expand Down Expand Up @@ -99,7 +99,7 @@ const mutations = {
let user = state.users.find(user => user.id == userid);
// increase count if user is enabled
if (group && user.enabled) {
group.usercount++;
group.usercount++;
}
let groups = user.groups;
groups.push(gid);
Expand Down Expand Up @@ -189,7 +189,7 @@ const actions = {

/**
* Get all users with full details
*
*
* @param {Object} context
* @param {Object} options
* @param {int} options.offset List offset to request
Expand Down Expand Up @@ -242,7 +242,7 @@ const actions = {

/**
* Get all users with full details
*
*
* @param {Object} context
* @param {Object} options
* @param {int} options.offset List offset to request
Expand All @@ -264,7 +264,7 @@ const actions = {

/**
* Get all users with full details from a groupid
*
*
* @param {Object} context
* @param {Object} options
* @param {int} options.offset List offset to request
Expand All @@ -276,7 +276,7 @@ const actions = {
.then((response) => context.commit('getUsersFromList', response.data.ocs.data.users))
.catch((error) => context.commit('API_FAILURE', error));
},


getPasswordPolicyMinLength(context) {
if(oc_capabilities.password_policy && oc_capabilities.password_policy.minLength) {
Expand All @@ -288,7 +288,7 @@ const actions = {

/**
* Add group
*
*
* @param {Object} context
* @param {string} gid Group id
* @returns {Promise}
Expand All @@ -311,22 +311,22 @@ const actions = {

/**
* Remove group
*
*
* @param {Object} context
* @param {string} gid Group id
* @returns {Promise}
*/
removeGroup(context, gid) {
return api.requireAdmin().then((response) => {
return api.delete(OC.linkToOCS(`cloud/groups/${gid}`, 2))
return api.delete(OC.linkToOCS(`cloud/groups/${encodeURIComponent(gid)}`, 2))
.then((response) => context.commit('removeGroup', gid))
.catch((error) => {throw error;});
}).catch((error) => context.commit('API_FAILURE', { gid, error }));
},

/**
* Add user to group
*
*
* @param {Object} context
* @param {Object} options
* @param {string} options.userid User id
Expand All @@ -343,7 +343,7 @@ const actions = {

/**
* Remove user from group
*
*
* @param {Object} context
* @param {Object} options
* @param {string} options.userid User id
Expand All @@ -359,13 +359,13 @@ const actions = {
context.commit('API_FAILURE', { userid, error });
// let's throw one more time to prevent
// the view from removing the user row on failure
throw error;
throw error;
});
},

/**
* Add user to group admin
*
*
* @param {Object} context
* @param {Object} options
* @param {string} options.userid User id
Expand All @@ -382,7 +382,7 @@ const actions = {

/**
* Remove user from group admin
*
*
* @param {Object} context
* @param {Object} options
* @param {string} options.userid User id
Expand All @@ -399,9 +399,9 @@ const actions = {

/**
* Delete a user
*
*
* @param {Object} context
* @param {string} userid User id
* @param {string} userid User id
* @returns {Promise}
*/
deleteUser(context, userid) {
Expand All @@ -414,7 +414,7 @@ const actions = {

/**
* Add a user
*
*
* @param {Object} context
* @param {Object} options
* @param {string} options.userid User id
Expand All @@ -439,9 +439,9 @@ const actions = {

/**
* Get user data and commit addition
*
*
* @param {Object} context
* @param {string} userid User id
* @param {string} userid User id
* @returns {Promise}
*/
addUserData(context, userid) {
Expand All @@ -452,8 +452,8 @@ const actions = {
}).catch((error) => context.commit('API_FAILURE', { userid, error }));
},

/** Enable or disable user
*
/** Enable or disable user
*
* @param {Object} context
* @param {Object} options
* @param {string} options.userid User id
Expand All @@ -471,8 +471,8 @@ const actions = {

/**
* Edit user data
*
* @param {Object} context
*
* @param {Object} context
* @param {Object} options
* @param {string} options.userid User id
* @param {string} options.key User field to edit
Expand Down Expand Up @@ -501,9 +501,9 @@ const actions = {

/**
* Send welcome mail
*
*
* @param {Object} context
* @param {string} userid User id
* @param {string} userid User id
* @returns {Promise}
*/
sendWelcomeMail(context, userid) {
Expand Down