Skip to main content

IAttributeLevelPermissionModel

@webda/core


Interface: IAttributeLevelPermissionModel

Defined in: packages/core/src/models/types.ts:69

Define a object that can define permission on attribute level

Deprecated​

No framework path calls attributePermission anymore: it is a leftover of the v3 attribute proxy. Per-field write rules go through the client input sanitization: the static getProtectedAttributes(context?) of the model (per caller when it reads the context), getClientWritableAttributes() and @readOnly; per-field read rules through toDTO(). See the Permissions documentation ("Client input" and "Per-caller field rules").

Extends​

Properties​

context​

context: Context

Defined in: packages/core/src/contexts/icontext.ts:268

Context

Inherited from​

IContextAware.context

Methods​

attributePermission()​

attributePermission(attribute, value, action): any

Defined in: packages/core/src/models/types.ts:73

Perform attribute permission

Parameters​

attribute​

string | symbol

value​

any

action​

"READ" | "WRITE"

Returns​

any