mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-07 13:44:17 +08:00
set networkuser access level
This commit is contained in:
parent
255e400be8
commit
42f0af85b6
1 changed files with 3 additions and 1 deletions
|
@ -140,8 +140,10 @@ func CreateUser(user models.User) (models.User, error) {
|
|||
|
||||
// legacy
|
||||
if StringSliceContains(user.Networks, currentNets[i].NetID) {
|
||||
if !Is_EE {
|
||||
newUser.AccessLevel = pro.NET_ADMIN
|
||||
}
|
||||
}
|
||||
userErr := pro.CreateNetworkUser(¤tNets[i], &newUser)
|
||||
if userErr != nil {
|
||||
logger.Log(0, "failed to add network user data on network", currentNets[i].NetID, "for user", user.UserName)
|
||||
|
|
Loading…
Add table
Reference in a new issue