mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
ipn/ipnlocal: fix Taildrop not returning any sharing targets
The CapabilityFileSharingTarget capability added by eb32847d85
is meant to control the ability to share with nodes not owned by the
current user, not to restrict all sharing (the coordination server is
not currently populating the capability at all)
Fixes tailscale/corp#6669
Signed-off-by: Mihai Parparita <mihai@tailscale.com>
This commit is contained in:
parent
f81723ceac
commit
7a5cf39d0d
@ -3287,7 +3287,7 @@ func (b *LocalBackend) FileTargets() ([]*apitype.FileTarget, error) {
|
|||||||
return nil, errors.New("file sharing not enabled by Tailscale admin")
|
return nil, errors.New("file sharing not enabled by Tailscale admin")
|
||||||
}
|
}
|
||||||
for _, p := range nm.Peers {
|
for _, p := range nm.Peers {
|
||||||
if p.User != nm.User || !slices.Contains(p.Capabilities, tailcfg.CapabilityFileSharingTarget) {
|
if p.User != nm.User && !slices.Contains(p.Capabilities, tailcfg.CapabilityFileSharingTarget) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
peerAPI := peerAPIBase(b.netMap, p)
|
peerAPI := peerAPIBase(b.netMap, p)
|
||||||
|
Loading…
Reference in New Issue
Block a user