Skip to content

Commit

Permalink
moving my branch
Browse files Browse the repository at this point in the history
  • Loading branch information
saidaipparla committed Oct 14, 2016
1 parent 63461df commit b4a83c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 3 additions & 5 deletions web/client/actions/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,12 @@ function createError(user, error) {
}

function saveUser(user, options = {}) {
return (dispatch, getState) => {
return (dispatch) => {
if (user && user.id) {
dispatch(savingUser(user));
return API.updateUser(user.id, {...user, groups: { group: user.groups}}, options).then((userDetails) => {
dispatch(savedUser(userDetails));
let state = getState && getState();
let oldText = get(state, "users.currentUser.name");
dispatch(getUsers(oldText));
dispatch(getUsers());
}).catch((error) => {
dispatch(saveError(user, error));
});
Expand All @@ -253,7 +251,7 @@ function saveUser(user, options = {}) {
let userToPost = {...user};
if (user && user.groups) {
userToPost = {...user, groups: { group: user.groups.filter((g) => {
return g.groupName !== "everyone";
return g.groupName !== "everyone"; // see:https://github.com/geosolutions-it/geostore/issues/149
})}};
}
return API.createUser(userToPost, options).then((id) => {
Expand Down
1 change: 1 addition & 0 deletions web/client/reducers/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function users(state = {
switch (action.type) {
case USERMANAGER_GETUSERS:
return assign({}, state, {
searchText: action.searchText,
status: action.status,
users: action.status === "loading" ? state.users : action.users,
start: action.start,
Expand Down

0 comments on commit b4a83c7

Please sign in to comment.