Don't allow delete group from peer groups (#2055)

This commit is contained in:
Maycon Santos
2024-05-27 11:06:43 +02:00
committed by GitHub
parent d35a79d3b5
commit d4c47eaf8a
2 changed files with 25 additions and 0 deletions

View File

@@ -245,6 +245,11 @@ func (am *DefaultAccountManager) DeleteGroup(accountId, userId, groupID string)
return &GroupLinkError{"route", string(r.NetID)}
}
}
for _, g := range r.PeerGroups {
if g == groupID {
return &GroupLinkError{"route", string(r.NetID)}
}
}
}
// check DNS links