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

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

Merged
merged 7 commits into from
Feb 7, 2025

Conversation

mscherer
Copy link
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
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 2, 2023
@github-actions github-actions bot added the modifies/cli PR changes something on the CLI, i.e. gitea doctor or gitea admin label Nov 2, 2023
cmd/admin_user_create.go Outdated Show resolved Hide resolved
@typed-sigterm
Copy link
Contributor

ping?

@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Feb 1, 2025
@mscherer
Copy link
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
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
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
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
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 Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. 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
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/templates This PR modifies the template files labels 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
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
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
26 checks passed
@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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them modifies/cli PR changes something on the CLI, i.e. gitea doctor or gitea admin modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files size/L Denotes a PR that changes 100-499 lines, ignoring generated files. 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