Examples

Contextual Role Expression Examples

Resource owner

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

userID == ownerID

Resource owner but not the creator

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

userID == ownerID && userID != 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(resource.values.editor, userID)

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.

userID == ownerID && !resource.values.published