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

Can't delete other owners #2186

Closed
4 tasks done
marius-arch opened this issue Nov 4, 2024 · 12 comments
Closed
4 tasks done

Can't delete other owners #2186

marius-arch opened this issue Nov 4, 2024 · 12 comments
Labels
🐛 Bug Something isn't working

Comments

@marius-arch
Copy link
Contributor

marius-arch commented Nov 4, 2024

Environment

Docker

Version

0.15.7

Describe the problem

I have 3 users with the owner and admin role but i can't delete them. The user i am logged in with also has both owner and admin role. When trying to delete one of the other two users i get 403 Forbidden and this message:
image

Also i can't demote the user:
image

Logs

ERROR tRPC OpenAPI error on user.details: TRPCError: UNAUTHORIZED

Context

No response

Please tick the boxes

  • I confirm that I attached the proper logs
  • I've read the docs
  • I've checked for duplicate issues
  • I've tried to debug myself
@marius-arch marius-arch added the 🐛 Bug Something isn't working label Nov 4, 2024
Copy link

github-actions bot commented Nov 4, 2024

Hi 👋. Thank you for submitting your first issue to Homarr. Please ensure that you've provided all nessesary information. You can use the three dots > Edit button to update your post with additional images and information. Depending on the current volume of requests, the team should get in conact with you shortly.

@ajnart
Copy link
Owner

ajnart commented Nov 4, 2024

Curious how you managed to have multiple owners, there should only be one

@marius-arch
Copy link
Contributor Author

@ajnart I can tell you how this happened.
I am using homarr quite some time now, and like 2 weeks ago i started integrating authelia and oicd in the applications that support it. When i integrated oicd into homarr i wasn't able to login anymore and when i tried remove oicd again, and login with my normal credentials my user was not owner anymore.

Then i found out that my first user had the same email specified as my user that was created by oicd. So i needed an extra user to be able to login and change the email of the first user. After doing so i was able to login in with my main authelia user and had owner rights. But now all three users have owner rights

@ajnart
Copy link
Owner

ajnart commented Nov 4, 2024

Oh wow that's very interesting, thanks for the clarification. I think @manuel-rw or @SeDemal would be more capable to help you than me. (I don't understand oidc stuff)

@SeDemal
Copy link
Collaborator

SeDemal commented Nov 4, 2024

You cannot delete other owners, that's the point of the role, only admin should be given to anyone else.
You can only remove said user of you manually edit the db.sqlite file.

@marius-arch
Copy link
Contributor Author

@ajnart, @SeDemal ok thank you for the help.

@marius-arch
Copy link
Contributor Author

@SeDemal but is it normal that it happens that i don't have the owner role anymore if both users (db user and authelia user) have the same email?

@SeDemal
Copy link
Collaborator

SeDemal commented Nov 4, 2024

Making multiple users on the same email will cause issues by itself and it is not recommended to have multiple Auth providers

@ajnart
Copy link
Owner

ajnart commented Nov 4, 2024

@SeDemal would it be possible to use the drizzle db editor from within the container ?
That might be a possibility

@SeDemal
Copy link
Collaborator

SeDemal commented Nov 4, 2024

I need to look if it's possible from the CLI actually, can't right now though.

@marius-arch
Copy link
Contributor Author

I fixed it by downloading the db.sqlite file and using DBeaver to delete/demote the users.

@Meierschlumpf
Copy link
Collaborator

Multiple users with the same email and different providers will be possible in v1.0, see #1993

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
Status: ✅ Done
Development

No branches or pull requests

4 participants