It would be nice if we could add conditions that given a user entity, and another entity of any type, and returns the result of field_access($op, $field, $entity_type, $entity, $account) where $op is either 'edit' or 'view'

Comments

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new0 bytes

Patch for review.

dave reid’s picture

StatusFileSize
new2.71 KB

Not empty patch this time.

Status: Needs review » Needs work

The last submitted patch, 1886638-rules-condition-field-access.patch, failed testing.

fago’s picture

Status: Needs work » Fixed

I made some small changes, e.g. to make $account optional, added basic test coverage + committed it. Thanks!

Also I realized we've no condition for checking entity access yet. Thus opened #1954344: Add "User has entity access" condition.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.