Kaizen
Browse modulesAccessaccess/serverFunctions

Function: computeGrantFingerprint()

function computeGrantFingerprint(input: {
  condition?:   | ConditionLogicNode
     | null;
  effectiveEnd?: Date | null;
  effectiveStart?: Date | null;
  selector?:   | ResourceSelector
     | null;
}): string;

Defined in: server/access/grant-fingerprint.ts:16

Stable hash over (selector, condition, effective dates) stored as grantFingerprint. Combined with (scopeKey, subjectType, subjectId, roleId) it enforces "no exact duplicate grant" via the unique index, while still allowing the same role with a different selector/condition/window.

Keys are sorted before serialization so semantically-equal selectors hash equally regardless of authoring order.

Parameters

ParameterType
input{ condition?: | ConditionLogicNode | null; effectiveEnd?: Date | null; effectiveStart?: Date | null; selector?: | ResourceSelector | null; }
input.condition?| ConditionLogicNode | null
input.effectiveEnd?Date | null
input.effectiveStart?Date | null
input.selector?| ResourceSelector | null

Returns

string

On this page