Add change-password admin command - #1304
Conversation
There was a problem hiding this comment.
I meant, that the encoded password isn't being printed. Should the usage not just be "change password of a user" ?
There was a problem hiding this comment.
Ah, of course, will fix and squash
|
It is now:
$ ./gitea admin --help | grep change
change-password Print encoded version of a given password
|
|
LGTM |
|
Yes, much better. And you're right about giving an error for users where it wouldn't be effective or some other method may still allow them to log in (if trying to disable with password change) |
There was a problem hiding this comment.
No reason, this was suggested by @bkcsoft on IRC if I recall correctly, and I thought it was a clean and self-describing name
There was a problem hiding this comment.
change-password is too long for a command, I think password is better!
|
LGTM |
|
You also have to type --username and --password so it is balanced to me
--strk;
Sent from hand-held device, sorry for brevity
|
There was a problem hiding this comment.
support -u or --username. Maybe username,u
There was a problem hiding this comment.
support -p or --password. Maybe password,p
|
agree with @appleboy |
|
This PR has 2 LGTM, please merge |
|
@strk Do you see my suggestions about adding more flags? |
|
@appleboy added -u and -p options, and rebased |
|
so I'm also happy with just "passwd" as the admin name (to reflect the unix command) but as the only existing command is |
tboerger
left a comment
There was a problem hiding this comment.
Generally I would prefer a user sub-command instead of admin.
| cli.StringFlag{ | ||
| Name: "username,u", | ||
| Value: "", | ||
| Usage: "Username", |
There was a problem hiding this comment.
Pretty useless usage information.
| cli.StringFlag{ | ||
| Name: "password,p", | ||
| Value: "", | ||
| Usage: "Password", |
There was a problem hiding this comment.
Pretty useless usage information.
|
If every single maintainer complains about something this will become much slower than Gogs. It's already happening that Gogs is ahead. This PR got 2 positive reviews, so about the rules it should just be merged. If you think maintainers should also have veto powers so please add a section about that in the CONTRIBUTING.md file. |
|
@tboerger don't really see the point of having |
|
LGTM working? |
|
LGTM is working but waiting build status. |
|
@bkcsoft Thanks for improving usage information |
Not working yet, need help