mirror of
https://github.com/juanfont/headscale.git
synced 2026-07-08 09:00:22 +09:00
7e4be35cd2
SaaS accepts tagOwners with circular references (tag:a -> tag:b -> tag:a, tag:a -> tag:a) by dropping the cycle edge instead of failing the policy. Each tag whose only path back is via the cycle resolves to the empty owner set; a sibling non-tag owner survives. headscale previously rejected the policy with ErrCircularReference at parse time. Drop the sentinel, change flattenTags to return an empty owner list on revisit, and update flattenTagOwners tests to capture the new behaviour including the sibling-survives edge case.