feat(acls): simplify updating rules
This commit is contained in:
parent
e482dfeed4
commit
e9949b4c70
2 changed files with 6 additions and 5 deletions
8
acls.go
8
acls.go
|
@ -69,14 +69,16 @@ func (h *Headscale) LoadACLPolicy(path string) error {
|
|||
}
|
||||
|
||||
h.aclPolicy = &policy
|
||||
return h.UpdateACLRules()
|
||||
}
|
||||
|
||||
func (h *Headscale) UpdateACLRules() error {
|
||||
rules, err := h.generateACLRules()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
h.aclRules = rules
|
||||
|
||||
log.Trace().Interface("ACL", rules).Msg("ACL rules generated")
|
||||
|
||||
h.aclRules = rules
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue