File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,9 @@ func runCreateUser(c *cli.Context) error {
9191 return fmt .Errorf ("invalid user type: %s" , c .String ("user-type" ))
9292 }
9393 if userType != user_model .UserTypeIndividual {
94+ // Some other commands like "change-password" also only support individual users.
95+ // It needs to clarify the "password" behavior for bot users in the future.
96+ // At the moment, we do not allow setting password for bot users.
9497 if c .IsSet ("password" ) || c .IsSet ("random-password" ) {
9598 return errors .New ("password can only be set for individual users" )
9699 }
Original file line number Diff line number Diff line change @@ -385,6 +385,7 @@ func (u *User) ValidatePassword(passwd string) bool {
385385}
386386
387387// IsPasswordSet checks if the password is set or left empty
388+ // TODO: It's better to clarify the "password" behavior for different types (individual, bot)
388389func (u * User ) IsPasswordSet () bool {
389390 return u .Passwd != ""
390391}
You can’t perform that action at this time.
0 commit comments