Zum Hauptinhalt springen

RtImportCallerContext

Namespace: Meshmakers.Octo.Runtime.Contracts.Exchange

Who initiated an RT import and which restrictions apply to it (AB#6392). RT imports run on a system session (replace semantics, creator stamping and the preserve pass stay as they are), so the identity of a user who triggered the import through the API is lost on the way through the job queue. This context carries the initiating caller into IImportRtModelCommand as a narrow flag: it adds the blueprint-lock protection of AB#6384 and nothing else. Blueprint install/update, forced re-apply and CK-model migrations call the command without a context and are unchanged.

public record RtImportCallerContext : IEquatable<RtImportCallerContext>

Inheritance Object → RtImportCallerContext
Implements IEquatable<RtImportCallerContext>

Properties​

SubjectId​

Subject id of the initiating caller (user sub claim or client id). Null when the queue message carried none (e.g. produced by an older service) — the protection is applied nevertheless.

public string SubjectId { get; set; }

Property Value​

String

EnforceBlueprintLock​

True when the import was initiated by a user or client through an API route: entities of CK types that opted in to the blueprint-lock protection (data policy attribute ProtectBlueprintLocked) cannot be overwritten when they are locked by a blueprint, and the blueprint bookkeeping attributes of the file are stripped. System flows leave this false.

public bool EnforceBlueprintLock { get; set; }

Property Value​

Boolean

Constructors​

RtImportCallerContext()​

public RtImportCallerContext()

Methods​

UserInitiated(String)​

Creates the context of an import initiated by a user or client through an API route. A missing subject never turns the import into a system import: the protection is applied regardless.

public static RtImportCallerContext UserInitiated(string subjectId)

Parameters​

subjectId String
Subject id of the caller, if known

Returns​

RtImportCallerContext