Files
safetynet/apps/browser/policy-assignment.cjs
T
2026-10-13 10:34:48 +02:00

11 lines
412 B
JavaScript

'use strict';
// Check the signed effective policy before any enrollment state or browser
// settings are committed. A valid fleet signature alone is not device binding.
function assertPolicyAssignment(policy, deviceId) {
if (policy.assignment && policy.assignment.deviceId !== deviceId) {
throw Error('Policy device assignment rejected');
}
return policy;
}
module.exports = {assertPolicyAssignment};