The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import { managedCapabilityDenial, type ServerConfig } from "@t3tools/contracts"; |
| 2 | |
| 3 | export function canShareWithGuest( |
| 4 | permitted: boolean, |
| 5 | config: |
| 6 | | { |
| 7 | readonly settings: Pick<ServerConfig["settings"], "guestSharingEnabled">; |
| 8 | readonly managedPolicy?: ServerConfig["managedPolicy"]; |
| 9 | } |
| 10 | | undefined, |
| 11 | ) { |
| 12 | return ( |
| 13 | permitted && |
| 14 | config?.settings.guestSharingEnabled === true && |
| 15 | managedCapabilityDenial(config.managedPolicy, "connect") === undefined |
| 16 | ); |
| 17 | } |