mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-10 11:14:21 +02:00
types,mapper,integration: enable Taildrive and add cap/drive grant lifecycle test
Add NodeAttrsTaildriveShare and NodeAttrsTaildriveAccess to the node capability map, enabling Taildrive file sharing when granted via policy. Add integration test verifying the full cap/drive grant lifecycle. Updates #2180
This commit is contained in:
@@ -1144,6 +1144,12 @@ func (nv NodeView) TailNode(
|
||||
capMap[tailcfg.CapabilityFileSharing] = []tailcfg.RawMessage{}
|
||||
}
|
||||
|
||||
// Enable Taildrive sharing and access on all nodes. The actual
|
||||
// access control is enforced by cap/drive grants in FilterRules;
|
||||
// without a matching grant these attributes alone do nothing.
|
||||
capMap[tailcfg.NodeAttrsTaildriveShare] = []tailcfg.RawMessage{}
|
||||
capMap[tailcfg.NodeAttrsTaildriveAccess] = []tailcfg.RawMessage{}
|
||||
|
||||
tNode := tailcfg.Node{
|
||||
//nolint:gosec // G115: NodeID values are within int64 range
|
||||
ID: tailcfg.NodeID(nv.ID()),
|
||||
|
||||
Reference in New Issue
Block a user