-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 "admin user generate-access-token" subcommand #17722
Conversation
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
aee5c70
to
96a980e
Compare
OK, so one last thing before we put this in:
I guess if the admin has access the command line and database they can do what they like so ... Also it appears that if the admin logs in with BasicAuth and sets Sudo they can create tokens for any user from the API. |
@singuliere I think one of us misunderstood the question. I do not think that's being asked to me. I proposed the feature and exposed my rationale on the linked bug, so yes I am ok. The way I understand it, it is asked to others devs (I mean, the "we" part kinda indicate to be aimed at the committers group to me). So maybe it should be rephrased as "can you (singuliere) answer to @zeripath question ?" :p I assume that you still have the same need as I have wrt ansible automation for a gitea installation, and I guess you are still using what was discussed before. I added that feature because i want to automate woodpecker deployment (which is I think also on the table for you), and that would requires a token to use the API. Hence this PR. |
I think the question was: Are we sure that we want to do this? I guess as the admin user can already do this through Sudo it's not a new thing so we can merge. |
Signed-off-by: Andrew Thornton <art27@cantab.net>
make lgtm work |
* giteaofficial/main: Fix EasyMDE error when input Enter (go-gitea#19004) Fix update hint bug (go-gitea#18996) Fix the editor height in review box (go-gitea#19003) Add a "admin user generate-access-token" subcommand (go-gitea#17722) Fix potential assignee query for repo (go-gitea#18994) Add config option to disable "Update branch by rebase" (go-gitea#18745) Update `go-enry` to v2.8.0 (go-gitea#18993) homebrew updates via cron ignore missing comment for user notifications (go-gitea#18954) allow overwrite artifacts for github releases (go-gitea#18987) fix & refactor (go-gitea#18973)
* Add a "admin user generate-access-token" subcommand Fixes go-gitea#17721 * Update cmd/admin.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> * Update cmd/admin.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> * Fix code to match new interfaces Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
Fixes #17721