Auth: Set role admin on user creation #98

This commit is contained in:
Timo Volkmann 2021-08-23 12:38:33 +02:00
parent 1bcdd4c6b1
commit e71c398b1e

View file

@ -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))