Auth: Set role admin on user creation #98
This commit is contained in:
parent
1bcdd4c6b1
commit
e71c398b1e
1 changed files with 1 additions and 0 deletions
|
@ -381,6 +381,7 @@ func CreateWithPassword(uc form.UserCreate) error {
|
|||
FullName: uc.FullName,
|
||||
UserName: uc.UserName,
|
||||
PrimaryEmail: uc.Email,
|
||||
RoleAdmin: true,
|
||||
}
|
||||
if len(uc.Password) < 4 {
|
||||
return fmt.Errorf("new password for %s must be at least 4 characters", txt.Quote(u.UserName))
|
||||
|
|
Loading…
Reference in a new issue