Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent unnecessary request when saving a user #8013

Merged
merged 1 commit into from
Nov 23, 2022
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
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-user-save-without-change
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Prevent unnecessary request when saving a user

We've fixed a bug where changing the role of a user without changing any other data would cause an unnecessary request.

https://github.com/owncloud/web/issues/8011
https://github.com/owncloud/web/pull/8013
6 changes: 5 additions & 1 deletion packages/web-app-user-management/src/views/Users.vue
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,11 @@ export default defineComponent({
},
async editUser(editUser) {
try {
const actualUser = this.users.find((user) => user.id === editUser.id)
const user = this.users.find((user) => user.id === editUser.id)
const actualUser = {
...(user && user),
passwordProfile: { password: '' }
}

const graphEditUserRawObjectExtractor = (user) => {
return omit(user, ['drive', 'role'])
Expand Down