You are reading the documentation for an outdated Corteza release. 2024.9 is the latest stable Corteza release.

Examples

Contextual Role Expression Examples

Resource owner

Assign this role when the current user is the resource owner.

subjectID == ownerID

Resource owner but not the creator

Assign this role when the current user is the resource owner but not the original creator.

subjectID == ownerID && subjectID != creatorID

Mentioned in the multi-value module field

Assign this role when the current user is mentioned in the editor multi-value field of the given record.

has(record.values.editor, subjectID)

Record owner with a specific record state

Assign this role when the current user is the record owner and the value of the published field is false.

subjectID == ownerID && !record.values.published