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

feat: support cmd command to reset to custom password #139

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wugeer
Copy link

@wugeer wugeer commented Feb 5, 2024

Background

daeuniverse/daed#211 daed resetpass need to set custom password

Checklist

Full Changelogs

  • feat: support cmd command to reset to custom password

Issue Reference

Fix 211 daed resetpass need to set custom password

Test Result

image

@wugeer wugeer requested a review from a team as a code owner February 5, 2024 04:58
@dae-prow dae-prow bot assigned wugeer Feb 5, 2024
@wugeer wugeer force-pushed the main branch 4 times, most recently from ccebdd9 to fb5a14f Compare February 5, 2024 06:02
@mzz2017 mzz2017 self-requested a review February 5, 2024 06:03
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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以改成 username 和 -u 吗,这个比较 common sense

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不建议给出默认值

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以改成 username 和 -u 吗,这个比较 common sense
好的,我修改下

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不建议给出默认值

username提供默认值主要是考虑到原先默认是改的是admin,想做这个兼容;不给默认值也可以的

Copy link
Author

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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

使用大 P 的原因是什么呢?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

使用大 P 的原因是什么呢?

我过度考虑了,改成小写p吧

@wugeer wugeer reopened this Mar 8, 2024
@sumire88
Copy link
Contributor

Any updates on this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

支持修改密码
3 participants