From e71c398b1e37ece6e88f91378a8368c2108705bf Mon Sep 17 00:00:00 2001 From: Timo Volkmann Date: Mon, 23 Aug 2021 12:38:33 +0200 Subject: [PATCH] Auth: Set role admin on user creation #98 --- internal/entity/user.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/entity/user.go b/internal/entity/user.go index 104b61ecc..ed9b32825 100644 --- a/internal/entity/user.go +++ b/internal/entity/user.go @@ -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))