mirror of
https://github.com/juanfont/headscale.git
synced 2026-09-10 02:31:59 +09:00
bbea92033c
Store compiledGrants and userNodeIndex on PolicyManager. Both filterForNodeLocked and BuildPeerMap now derive from the same compiled grants, eliminating the dual-path architecture. Delete: - compileViaGrant (filter.go): replaced by compileViaForNode - compileGrantWithAutogroupSelf (filter.go): replaced by compileGrants + compileAutogroupSelf - compileFilterRulesForNodeLocked (policy.go): replaced by filterRulesForNodeLocked - compiledFilterRulesMap cache (policy.go): no longer needed - usesAutogroupSelf field and method: detection now happens during grant compilation (grantCategorySelf/grantCategoryVia) - hasViaGrants method: same The needsPerNodeFilter flag is now derived from the compiled grants via hasPerNodeGrants. filterForNodeLocked no longer returns error since the new path cannot fail. Updates #3157