Skip to main content

RtDataPermissionCkTypeHelper

Namespace: Meshmakers.Octo.Runtime.Contracts.DataPermissions

Shared helpers for resolving CK type hierarchies against the data-permission model.

public static class RtDataPermissionCkTypeHelper

Inheritance ObjectRtDataPermissionCkTypeHelper

Methods

GetSelfAndBaseFullNames(ICkCacheService, String, RtCkId<CkTypeId>)

Returns the canonical names of the type and all its base types (policies targeting a base or collection-root type protect derived types). Falls back to the id itself when the type is unknown in the tenant's CK cache.

public static IReadOnlyList<string> GetSelfAndBaseFullNames(ICkCacheService ckCacheService, string tenantId, RtCkId<CkTypeId> rtCkTypeId)

Parameters

ckCacheService ICkCacheService
The CK cache

tenantId String
The tenant id

rtCkTypeId RtCkId<CkTypeId>
The runtime type id

Returns

IReadOnlyList<String>

GetEffectiveOwnerAttributePath(ICkCacheService, String, RtCkId<CkTypeId>)

Returns the effective owner attribute path of a type for owned-only data permissions (AB#4978): the CK-model-declared (or inherited) String-terminated attribute path (Record segments allowed) identifying the owning subject, or null when ownership is the server-stamped rtCreatedBy — including when the type is unknown in the tenant's CK cache (fail to the unspoofable default).

public static string GetEffectiveOwnerAttributePath(ICkCacheService ckCacheService, string tenantId, RtCkId<CkTypeId> rtCkTypeId)

Parameters

ckCacheService ICkCacheService
The CK cache

tenantId String
The tenant id

rtCkTypeId RtCkId<CkTypeId>
The runtime type id

Returns

String

CanonicalCkTypeId(String)

Canonicalizes a CK type id string to the platform's stored/wire form ( — element version elided when 1, e.g. "Basic/Employee" or "Basic/Employee-2"). Every string comparison in the data-permission evaluation uses this one form; parse failures keep the literal so a malformed policy target still fails closed against rows carrying that literal type id.

public static string CanonicalCkTypeId(string ckTypeId)

Parameters

ckTypeId String
The CK type id string as entered (policy target)

Returns

String