mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
Set User.groups to []
This commit is contained in:
@ -216,6 +216,9 @@ func refineUser(user *User) *User {
|
||||
if user.Permissions == nil {
|
||||
user.Permissions = []*Permission{}
|
||||
}
|
||||
if user.Groups == nil {
|
||||
user.Groups = []string{}
|
||||
}
|
||||
|
||||
return user
|
||||
}
|
||||
|
@ -781,6 +781,10 @@ func ExtendUserWithRolesAndPermissions(user *User) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
if user.Groups == nil {
|
||||
user.Groups = []string{}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user