-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Func 'runCreateUser' of cli command needs to check the value of DEFAULT_USER_VISIBILITY #22523
Comments
I've analysed this particular Helm Chart issue and what I noticed is that the user create cli command runs without taking the actual app.ini into account with regards to a (possible) default value other than So from my perspective there would be a bugfix for that and maybe a feature for allowing to set the visibility via cli. |
Should the issue better be moved to https://gitea.com/gitea/tea? |
No, it looks like this is particularly a command in the Gitea binary itself. I think at the very least a flag for setting visibility can be added. 👍 |
Yep. It's the built-in |
…0) (#22760) Backport #22750 Fixes go-gitea/gitea#22523 Co-authored-by: yp05327 <576951401@qq.com>
Description
I have post a issue at this project: gitea/helm-chart
Admin account's user visibility is public even ALLOWED_USER_VISIBILITY_MODES equals private
But i found that this maybe an issue of gitea cli.
Problem:
In the official helm chart, cli command is used to create the first admin user.
gitea admin user create --admin --username "${GITEA_ADMIN_USERNAME}" --password "${GITEA_ADMIN_PASSWORD}" --email {{ .Values.gitea.admin.email | quote }} --must-change-password=false
This command will call func
runCreateUser
which is defined ingitea/cmd/admin.go
.In this function, a new user will be create without checking the env variable
DEFAULT_USER_VISIBILITY
.so this new user's visibility will always be
public
.If you set the env as the following:
When you login with the first created admin user, You will get 500 server error page. Because this user's visibility is
public
but ALLOWED_USER_VISIBILITY_MODES is private.
Gitea Version
1.18.1
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?
Using Official Helm Chart
Helm Chart Version: 7.0.0
Gitea version: 1.18.1
env setting:
Database
MySQL
The text was updated successfully, but these errors were encountered: