This commit is contained in:
afeiszli
2022-09-14 09:58:01 -04:00
parent e340b49aa8
commit 8a1ba674a7
5 changed files with 34 additions and 3 deletions

View File

@@ -70,3 +70,10 @@ func InitializeNetUsers(network *models.Network) error {
}
return nil
}
// SetUserDefaults - sets the defaults of a user to avoid empty fields
func SetUserDefaults(user *models.User) {
if user.Groups == nil {
user.Groups = []string{pro.DEFAULT_ALLOWED_GROUPS}
}
}