@livedesk/hub 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -234,18 +234,25 @@ export function publicSettings(settings) {
|
|
|
234
234
|
|
|
235
235
|
export function effectiveDevicePolicy(settings = DEFAULT_LIVEDESK_SETTINGS) {
|
|
236
236
|
const normalized = normalizeLiveDeskSettings(settings);
|
|
237
|
+
// The retired ask-every-time surface has no interactive approval authority,
|
|
238
|
+
// so a persisted legacy value must fail closed. View-only remains able to
|
|
239
|
+
// receive video/audio while every mutating operation is blocked.
|
|
240
|
+
const accessMode = normalized.security.accessMode === 'ask-every-time'
|
|
241
|
+
? 'block-remote-access'
|
|
242
|
+
: normalized.security.accessMode;
|
|
243
|
+
const allowMutation = accessMode === 'trusted-only';
|
|
237
244
|
return {
|
|
238
245
|
settingsSchemaVersion: normalized.settingsSchemaVersion,
|
|
239
246
|
policyRevision: Number(settings?.revision || 0),
|
|
240
|
-
accessMode
|
|
247
|
+
accessMode,
|
|
241
248
|
allowInternetConnections: normalized.security.allowInternetConnections,
|
|
242
249
|
allowLanConnections: normalized.security.allowLanConnections,
|
|
243
250
|
requireEncryptedConnections: normalized.security.requireEncryptedConnections,
|
|
244
251
|
allowUnencryptedLanFallback: normalized.security.allowUnencryptedLanFallback,
|
|
245
|
-
allowControl:
|
|
246
|
-
allowClipboardText:
|
|
247
|
-
allowFileTransfer:
|
|
248
|
-
allowRemoteAudio:
|
|
249
|
-
allowAgent:
|
|
252
|
+
allowControl: allowMutation && normalized.control.allowKeyboardMouse,
|
|
253
|
+
allowClipboardText: allowMutation && normalized.control.allowClipboardText,
|
|
254
|
+
allowFileTransfer: allowMutation && normalized.filesAudio.allowFileTransfer,
|
|
255
|
+
allowRemoteAudio: accessMode !== 'block-remote-access' && normalized.filesAudio.allowRemoteAudio,
|
|
256
|
+
allowAgent: allowMutation && normalized.agent.enabled
|
|
250
257
|
};
|
|
251
258
|
}
|