Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

User Role cannot be changed from the UI #198

Closed
haivala opened this issue Sep 17, 2022 · 4 comments · May be fixed by ohmyform/api#49
Closed

User Role cannot be changed from the UI #198

haivala opened this issue Sep 17, 2022 · 4 comments · May be fixed by ohmyform/api#49
Milestone

Comments

@haivala
Copy link

haivala commented Sep 17, 2022

What's this issue about?

User Role cannot be changed from the UI. The error is that user email is in the use already and even if the email is changed with the role the Role of a user does not change.

Expected behavior

User Role could be changed

Actual behavior

It throws a error and the log says the users email is in use already.

context":"ExceptionsHandler","err":{"type":"Error","message":"email already in use","stack":"Error: email already in use\n    at UserUpdateService.update (/usr/src/app/dist/service/user/user.update.service.js:37:23)\n    at processTicksAndRejections (internal/process/task_queues.js:95:5)\n    at async UserUpdateMutation.updateUser (/usr/src/app/dist/resolver/user/user.update.mutation.js:38:9)\n    at async target (/usr/src/app/node_modules/@nestjs/core/helpers/external-context-creator.js:77:28)\n    at async Object.updateUser (/usr/src/app/node_modules/@nestjs/core/helpers/external-proxy.js:9:24)"},"msg":"email already in use"}

Steps to reproduce

  1. Make SuperAdmin with a deployment
  2. Make normal user from the frontend.
  3. Log in with the superadmin and try to change users role

Environment

docker-compose stack.

@yannickh2
Copy link

We have a similar problem: Screenshot attached. Trying to change from User to Admin throws an error.
CannotSaveUserasAdmin

@MacBadger
Copy link

yep, same issue here

Only one user registered- the original admin
Got new user to signup
Attempted to change user > admin

"could not update user"

@ulfgebhardt
Copy link

Working fix available here ohmyform/api#49

@wodka wodka added this to the 1.0.4 milestone Dec 11, 2023
@wodka
Copy link
Contributor

wodka commented Dec 11, 2023

thx for the fix - just applied it to the api

@wodka wodka closed this as completed Dec 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants