mirror of
https://github.com/juanfont/headscale.git
synced 2026-07-08 00:50:20 +09:00
2b61b26772
SaaS rejects any group-in-group reference (chain, cycle, or self-reference) with `groups["X"]: "Y": group members cannot be recursive`. headscale rejected the same input but the message surfaced as a generic JSON parse error from the unmarshal layer. Groups.UnmarshalJSON now scans the raw map in descending alphabetical order and reports the first group whose member is itself a group, mirroring the (X, Y) pair SaaS picks (deepest non-leaf parent first). Drop the now-unused ErrNestedGroups sentinel and update the existing group-in-group test row plus add chain, cycle, and self-cycle rows.