-
-
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
Improve "must-change-password" logic and document #30472
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -83,8 +83,7 @@ Admin operations: | |||||
- `--email value`: Email. Required. | ||||||
- `--admin`: If provided, this makes the user an admin. Optional. | ||||||
- `--access-token`: If provided, an access token will be created for the user. Optional. (default: false). | ||||||
- `--must-change-password`: If provided, the created user will be required to choose a newer password after the | ||||||
initial login. Optional. (default: true). | ||||||
- `--must-change-password`: The created user will be required to set a new password after the initial login, default: true. It could be disabled by `--must-change-password=false`. | ||||||
wxiaoguang marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
- `--random-password`: If provided, a randomly generated password will be used as the password of the created | ||||||
user. The value of `--password` will be discarded. Optional. | ||||||
- `--random-password-length`: If provided, it will be used to configure the length of the randomly generated | ||||||
|
@@ -95,7 +94,7 @@ Admin operations: | |||||
- Options: | ||||||
- `--username value`, `-u value`: Username. Required. | ||||||
- `--password value`, `-p value`: New password. Required. | ||||||
- `--must-change-password`: If provided, the user is required to choose a new password after the login. Optional. | ||||||
- `--must-change-password`: The user is required to set a new password after the login, default: true. It could be disabled by `--must-change-password=false`. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think it should be "be disabled by something" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
- Examples: | ||||||
- `gitea admin user change-password --username myname --password asecurepassword` | ||||||
- `must-change-password`: | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't these errors shown to the user?
So, shouldn't they be correct English instead of Go error messages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message is outputed here, so it should be a valid Go error message. And it is correct English.