-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: support cmd command to reset to custom password #139
Conversation
ccebdd9
to
fb5a14f
Compare
cmd/resetpass.go
Outdated
}, | ||
} | ||
) | ||
|
||
func init() { | ||
resetpassCmd.PersistentFlags().StringVarP(&cfgDir, "config", "c", filepath.Join("/etc", db.AppName), "config directory") | ||
resetpassCmd.PersistentFlags().StringVarP(&userName, "name", "n", defaultUserName, "user name") |
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.
可以改成 username 和 -u 吗,这个比较 common sense
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.
不建议给出默认值
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.
可以改成 username 和 -u 吗,这个比较 common sense
好的,我修改下
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.
不建议给出默认值
username提供默认值主要是考虑到原先默认是改的是admin,想做这个兼容;不给默认值也可以的
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.
代码已经修改,麻烦抽空审核下 @mzz2017
cmd/resetpass.go
Outdated
}, | ||
} | ||
) | ||
|
||
func init() { | ||
resetpassCmd.PersistentFlags().StringVarP(&cfgDir, "config", "c", filepath.Join("/etc", db.AppName), "config directory") | ||
resetpassCmd.PersistentFlags().StringVarP(&userName, "name", "n", defaultUserName, "user name") | ||
resetpassCmd.PersistentFlags().StringVarP(&newUserPassword, "password", "P", defaultUserPassword, "user new 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.
使用大 P 的原因是什么呢?
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.
使用大 P 的原因是什么呢?
我过度考虑了,改成小写p吧
Any updates on this one? |
Background
daeuniverse/daed#211 daed resetpass need to set custom password
Checklist
Full Changelogs
Issue Reference
Fix 211 daed resetpass need to set custom password
Test Result