Skip to content

Add a option "--user-type bot" to admin user create, improve role display#27885

Merged
wxiaoguang merged 7 commits into
go-gitea:mainfrom
mscherer:add_option_bot
Feb 7, 2025
Merged

Add a option "--user-type bot" to admin user create, improve role display#27885
wxiaoguang merged 7 commits into
go-gitea:mainfrom
mscherer:add_option_bot

Conversation

@mscherer
Copy link
Copy Markdown
Contributor

@mscherer mscherer commented Nov 2, 2023

Partially solve #13044

Fix #33295

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 2, 2023
Comment thread cmd/admin_user_create.go Outdated
@typed-sigterm
Copy link
Copy Markdown
Contributor

ping?

@mscherer
Copy link
Copy Markdown
Contributor Author

mscherer commented Feb 1, 2025

@typed-sigterm not sure what the ping was for, but in doubt, I rebased my PR. I still would like some feedback on the UI for the question of the subcommand

@lunny
Copy link
Copy Markdown
Member

lunny commented Feb 1, 2025

@typed-sigterm not sure what the ping was for, but in doubt, I rebased my PR. I still would like some feedback on the UI for the question of the subcommand

Looks like https://github.com/go-gitea/gitea/pull/27885/files#r1380815227 is better to have.

@wxiaoguang
Copy link
Copy Markdown
Contributor

I will help to make some improvements, and fix more "bot" related logic

@wxiaoguang wxiaoguang self-assigned this Feb 2, 2025
@wxiaoguang
Copy link
Copy Markdown
Contributor

Hmm, have a question here: should we allow bot users to login via password?

  • If no, just disable the password auth for bot users (my intuition is this)
  • If yes: what's the real use case? Could the access token be used instead?

@lunny
Copy link
Copy Markdown
Member

lunny commented Feb 3, 2025

Hmm, have a question here: should we allow bot users to login via password?

* If no, just disable the password auth for bot users (my intuition is this)

* If yes: what's the real use case? Could the access token be used instead?

I don't think bot users should be allowed log in except access token cannot be generated at the moment.

@pull-request-size pull-request-size Bot added size/L and removed size/S labels Feb 6, 2025
@wxiaoguang wxiaoguang changed the title Add a option --bot to admin user create Add a option "--user-type bot" to admin user create Feb 6, 2025
@wxiaoguang wxiaoguang changed the title Add a option "--user-type bot" to admin user create Add a option "--user-type bot" to admin user create, improve role display Feb 6, 2025
wxiaoguang
wxiaoguang previously approved these changes Feb 6, 2025
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 6, 2025
@GiteaBot GiteaBot added lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 6, 2025
@wxiaoguang
Copy link
Copy Markdown
Contributor

@mscherer @typed-sigterm could you help to confirm: whether we should allow the bot user to sign-in via password?

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 6, 2025
@wxiaoguang
Copy link
Copy Markdown
Contributor

wxiaoguang commented Feb 7, 2025

@mscherer I will vote my approval.

If you have time please take a look at the new logic:

  1. The password is kept unset when creating a bot user.
  2. The bot user's local password login is disabled (because the password is not set)

Since these changes are still in main branch, they are open to change if there are some requirements (and we can add more comments and tests)

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 7, 2025
@wxiaoguang wxiaoguang enabled auto-merge (squash) February 7, 2025 08:18
@wxiaoguang wxiaoguang merged commit 063c23e into go-gitea:main Feb 7, 2025
@GiteaBot GiteaBot added this to the 1.24.0 milestone Feb 7, 2025
@wxiaoguang wxiaoguang added the type/enhancement An improvement of existing functionality label Feb 7, 2025
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 10, 2025
* giteaofficial/main:
  Feature: Support workflow event dispatch via API (go-gitea#32059)
  Remove "class-name" from svg icon (go-gitea#33540)
  Add "No data available" display when list is empty (go-gitea#33517)
  Add a option "--user-type bot" to admin user create, improve role display (go-gitea#27885)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators May 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The displayed account is incorrect, and gitea-actions is constantly recognized as a first-time contributor.

6 participants