mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-04 12:43:05 +00:00
chore(policy): Change expandAutoGroup
into a receiver func
This commit is contained in:
parent
2732e7a017
commit
dd528a1753
1 changed files with 2 additions and 2 deletions
|
@ -671,7 +671,7 @@ func (pol *ACLPolicy) ExpandAlias(
|
||||||
}
|
}
|
||||||
|
|
||||||
if isAutoGroup(alias) {
|
if isAutoGroup(alias) {
|
||||||
return expandAutoGroup(pol, alias, nodes)
|
return pol.expandAutoGroup(alias, nodes)
|
||||||
}
|
}
|
||||||
|
|
||||||
// if alias is a user
|
// if alias is a user
|
||||||
|
@ -990,7 +990,7 @@ func (pol *ACLPolicy) expandIPsFromIPPrefix(
|
||||||
return build.IPSet()
|
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 {
|
switch {
|
||||||
case strings.HasPrefix(alias, autogroupInternet):
|
case strings.HasPrefix(alias, autogroupInternet):
|
||||||
return theInternet(), nil
|
return theInternet(), nil
|
||||||
|
|
Loading…
Reference in a new issue