Zum Hauptinhalt springen

CkMethodAuthorizationDto

Namespace: Meshmakers.Octo.ConstructionKit.Contracts.DataTransferObjects

Authorization of a CkMethodDto (CK v2). The scope octo_api is always required.

public class CkMethodAuthorizationDto

Inheritance Object → CkMethodAuthorizationDto

Properties​

Roles​

Any-of role names (role claim): one listed role suffices. DEFAULT-DENY (platform-owner decision 2026-10-10): an omitted or empty list — and an omitted authorization block — admits administrators only, not every caller with octo_api. Adding a role is looser, removing one (or emptying the list) stricter.

public List<string> Roles { get; set; }

Property Value​

List<String>

AllowSelf​

True when the caller may invoke an instance method on its own entity (caller sub == target rtId).

public bool AllowSelf { get; set; }

Property Value​

Boolean

Scopes​

Additional required scopes, all-of: every listed scope is required in addition to octo_api. Adding a scope is stricter, removing one looser.

public List<string> Scopes { get; set; }

Property Value​

List<String>

DataAccess​

CK v2 Phase 3: the data permission a caller needs on the method's target record. Read declares that the method only reads its target, so a read grant on the target suffices; null (omitted) means CkMethodDataAccessDto.Write: the method needs a write grant (the effective value is CkMethodAuthorization.Resolve(CkMethodAuthorizationDto)). The declaration widens what a read-only caller may do, so it is security-relevant for SemVer (row M18). Not serialized when omitted, so models that do not use the key serialize byte-identically; a model that uses it carries a raised minEngineVersion (CkEngineVersion.DataAccessMinEngineVersion), so older engines refuse it with message 126 instead of silently dropping the declaration. Requires ckLanguage: 2.

public Nullable<CkMethodDataAccessDto> DataAccess { get; set; }

Property Value​

Nullable<CkMethodDataAccessDto>

Constructors​

CkMethodAuthorizationDto()​

public CkMethodAuthorizationDto()