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

Create org permissions of user created via cli client #25898

Closed
nbenn opened this issue Jul 15, 2023 · 4 comments · Fixed by #26402
Closed

Create org permissions of user created via cli client #25898

nbenn opened this issue Jul 15, 2023 · 4 comments · Fixed by #26402
Labels
Milestone

Comments

@nbenn
Copy link

nbenn commented Jul 15, 2023

Description

With (default) settings as

[admin]
DISABLE_REGULAR_ORG_CREATION = false

[service]
DEFAULT_ALLOW_CREATE_ORGANIZATION = true

a user created via gitea admin user create does not have "create org" permissions. If it is intentional that the CLI client does not respect the relevant settings, it might be helpful to add an option to the CLI client.

Gitea Version

1.19.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/nbenn/f4cf2314da1cc32d8d5325b9a0e9cbe3

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker: gitea/gitea:1.19.0

Database

SQLite

@cassiozareck
Copy link
Contributor

Thanks for sharing this issue

@lunny
Copy link
Member

lunny commented Aug 9, 2023

Maybe caused by #25330

@wxiaoguang
Copy link
Contributor

Maybe caused by #25330

No, it's not related IMO.

Before #25330, func Init(opts *Options) { also only called loadCommonSettingsFrom, the settings were never fully loaded.

After #25330, the loadCommonSettingsFrom is also called, so it's not related.

@lunny lunny added this to the 1.23.0 milestone Dec 28, 2024
@lunny
Copy link
Member

lunny commented Dec 29, 2024

I can see what happened. The loadCommonSettingsFrom will be loaded but loadServiceFrom will not be included. And DEFAULT_ALLOW_CREATE_ORGANIZATION = true hasn't been loaded.

图片

GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Dec 30, 2024
Closes go-gitea#25898
The problem was that the default settings weren't being loaded

---------

Signed-off-by: cassiozareck <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
wxiaoguang added a commit that referenced this issue Dec 30, 2024
Backport #26402 by cassiozareck

Closes #25898

Signed-off-by: cassiozareck <[email protected]>
Co-authored-by: cassio zareck <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants