HTTP 500 while creating users #11258

Closed
opened 2025-11-02 09:32:36 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @KazzmanK on GitHub (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

Originally created by @KazzmanK on GitHub (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](https://github.com/go-gitea/gitea/assets/13328513/46648d03-08c7-439c-8d3f-0bd74d3f1364) ### 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
GiteaMirror added the issue/criticaltype/bug labels 2025-11-02 09:32:36 -06:00
Author
Owner

@lunny commented on GitHub (Jul 19, 2023):

I think this should be fixed by #24867

@lunny commented on GitHub (Jul 19, 2023): I think this should be fixed by #24867
Author
Owner

@KazzmanK commented on GitHub (Jul 19, 2023):

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.

@KazzmanK commented on GitHub (Jul 19, 2023): 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.
Author
Owner

@stuzer05 commented on GitHub (Jul 25, 2023):

It's fixed

@stuzer05 commented on GitHub (Jul 25, 2023): It's fixed
Author
Owner

@ovisan commented on GitHub (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 
@ovisan commented on GitHub (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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11258