File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 59
59
Value : "custom/conf/app.ini" ,
60
60
Usage : "Custom configuration file path" ,
61
61
},
62
+ cli.StringFlag {
63
+ Name : "must-change-password" ,
64
+ Value : "false" ,
65
+ Usage : "Force the user to change his/her password after initial login" ,
66
+ },
62
67
},
63
68
}
64
69
@@ -286,11 +291,12 @@ func runCreateUser(c *cli.Context) error {
286
291
}
287
292
288
293
if err := models .CreateUser (& models.User {
289
- Name : c .String ("name" ),
290
- Email : c .String ("email" ),
291
- Passwd : c .String ("password" ),
292
- IsActive : true ,
293
- IsAdmin : c .Bool ("admin" ),
294
+ Name : c .String ("name" ),
295
+ Email : c .String ("email" ),
296
+ Passwd : c .String ("password" ),
297
+ IsActive : true ,
298
+ IsAdmin : c .Bool ("admin" ),
299
+ MustChangePassword : c .Bool ("must-change-password" ),
294
300
}); err != nil {
295
301
return fmt .Errorf ("CreateUser: %v" , err )
296
302
}
You can’t perform that action at this time.
0 commit comments