mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-23 02:47:40 -05:00
chore(policy): Change expandAutoGroup into a receiver func
This commit is contained in:
@@ -671,7 +671,7 @@ func (pol *ACLPolicy) ExpandAlias(
|
||||
}
|
||||
|
||||
if isAutoGroup(alias) {
|
||||
return expandAutoGroup(pol, alias, nodes)
|
||||
return pol.expandAutoGroup(alias, nodes)
|
||||
}
|
||||
|
||||
// if alias is a user
|
||||
@@ -990,7 +990,7 @@ func (pol *ACLPolicy) expandIPsFromIPPrefix(
|
||||
return build.IPSet()
|
||||
}
|
||||
|
||||
func expandAutoGroup(pol *ACLPolicy, alias string, nodes types.Nodes) (*netipx.IPSet, error) {
|
||||
func (pol *ACLPolicy) expandAutoGroup(alias string, nodes types.Nodes) (*netipx.IPSet, error) {
|
||||
switch {
|
||||
case strings.HasPrefix(alias, autogroupInternet):
|
||||
return theInternet(), nil
|
||||
|
||||
Reference in New Issue
Block a user