Download & Extend

Condition for checking field_access() for a given user, entity and field

Project:Rules
Version:7.x-2.x-dev
Component:Rules Core
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

#1

Status:active» needs review

Patch for review.

AttachmentSizeStatusTest resultOperations
1886638-rules-condition-field-access.patch0 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 327 pass(es).View details

#2

Not empty patch this time.

AttachmentSizeStatusTest resultOperations
1886638-rules-condition-field-access.patch2.71 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1886638-rules-condition-field-access_0.patch. Unable to apply patch. See the log in the details link for more information.View details

#3

Status:needs review» needs work

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

#4

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.

#5

Status:fixed» closed (fixed)

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

nobody click here