restrictiveMerge
open fun restrictiveMerge(@Nullable cached: UserRoleAccess, @Nullable propertyDefault: UserRoleAccess): UserRoleAccess
Per-property restrictive merge of a cached role access against a computed property-default access. Used on the offline-after-TTL path: a cached grant that is still trusted wins over a default, but a locked-property fail-closed sentinel always wins (more restrictive). Resolution per property:
- If either side is the NO_ACCESS_SENTINEL, the result is the sentinel (the engine resolves it to the DEFAULT access level, stripping any elevated grant — the most restrictive outcome expressible).
- Otherwise a concrete grant (non-blank accessLevelId) wins over an empty/
""grant (""resolves to the property default; the user-specific grant is the deliberate assignment). - If both sides carry a concrete grant, the cached grant is kept (it is the user-specific assignment; the default is a fallback).
Return
the more-restrictive merged UserRoleAccess.
Parameters
cached
the access derived from the cached roles (may be empty).
propertyDefault
the access derived from property defaults / locked-property fail-closed policy (may be empty).