Files
tailscale/util/syspolicy/policyclient/policy_snapshot.go
kari-ts 00650c0b3b ipn, ipn/local: expose hidden device gui gui_visibility (#21822)
This interprets HiddenNetworkDevices per watch session and sends GUI visibility metadata for peers (without filtering them). We refresh the visibility snapshot when policy or peer membership changes.

Updates tailscale/corp#44104

Signed-off-by: kari-ts <[email protected]>
2026-10-23 11:45:38 -07:00

24 lines
552 B
Go

// Copyright (c) Tailscale Inc & contributors
// SPDX-License-Identifier: BSD-3-Clause
//go:build !ts_omit_syspolicy
package policyclient
import (
"tailscale.com/util/syspolicy/pkey"
"tailscale.com/util/syspolicy/setting"
)
// PolicySnapshot is an alias for [settings.Snapshot] unless syspolicy is omitted
// from the build.
type policySnapshot = setting.Snapshot
func GetStringArrayFromSnapshot(snapshot *PolicySnapshot, key pkey.Key) []string {
if snapshot == nil {
return nil
}
values, _ := snapshot.Get(key).([]string)
return values
}