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

HTTP 500 while creating users #25951

Closed
KazzmanK opened this issue Jul 18, 2023 · 4 comments · Fixed by #26200
Closed

HTTP 500 while creating users #25951

KazzmanK opened this issue Jul 18, 2023 · 4 comments · Fixed by #26200
Labels
issue/critical This issue should be fixed ASAP. If it is a PR, the PR should be merged ASAP type/bug
Milestone

Comments

@KazzmanK
Copy link
Contributor

KazzmanK commented Jul 18, 2023

Description

I tried to create a new user, user visibility was defaulted to private, but after clicking Create user - error 500.
Should it be a 500 error? May be a more user friendly message?
But I set user visibility to "Private", and Public users are indeed disallowed. And there was no "Public" item in visibility dropdown at all.

It looks like UI inconsistency between default dropdown selection and data passed to backend.
If I re-select Private in dropdown, user created without error.

image

Gitea Version

1.20

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

win service

Database

None

@lunny
Copy link
Member

lunny commented Jul 19, 2023

I think this should be fixed by #24867

@KazzmanK
Copy link
Contributor Author

But this is a new user creation, not updating existing one. Looks more like a UI issue, where wrong item from dropdown select is passed to back.

@stuzer05
Copy link

It's fixed

@lunny lunny added the issue/critical This issue should be fixed ASAP. If it is a PR, the PR should be merged ASAP label Jul 27, 2023
@ovisan
Copy link

ovisan commented Jul 28, 2023

I am facing the same issue. We have 2 gitea instances deployed (dev and prod) in kubernetes via helm, with the same settings in the helmrelease. In prod i can create a user when the visibility is set to private, but in dev i get 500.

This is the eror line from the pod.

│ gitea 2023/07/28 08:13:31 ...ers/web/auth/auth.go:516:createUserInContext() [E] [64c378ab] CreateUser: visibility Mode not allowed: private 

@lunny lunny added this to the 1.20.2 milestone Jul 28, 2023
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Jul 28, 2023
wxiaoguang pushed a commit that referenced this issue Jul 29, 2023
Backport #26200 by @lunny

Fix #25951

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/critical This issue should be fixed ASAP. If it is a PR, the PR should be merged ASAP type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants