mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-05 20:54:18 +08:00
add network admin grp to admins users
This commit is contained in:
parent
28e60c404c
commit
b47bbdd316
1 changed files with 3 additions and 0 deletions
|
@ -455,6 +455,9 @@ func listPoliciesOfUser(user models.User, netID models.NetworkID) []models.Acl {
|
|||
if _, ok := user.UserGroups[globalNetworksUserGroupID]; ok {
|
||||
user.UserGroups[GetDefaultNetworkUserGroupID(netID)] = struct{}{}
|
||||
}
|
||||
if user.PlatformRoleID == models.AdminRole || user.PlatformRoleID == models.SuperAdminRole {
|
||||
user.UserGroups[GetDefaultNetworkAdminGroupID(netID)] = struct{}{}
|
||||
}
|
||||
for _, acl := range allAcls {
|
||||
if acl.NetworkID == netID && acl.RuleType == models.UserPolicy {
|
||||
srcMap := logic.ConvAclTagToValueMap(acl.Src)
|
||||
|
|
Loading…
Add table
Reference in a new issue