We are using Business Rules to execute a view (users) that returns a list of email addresses. It works fine when rule is triggered by admin, but does not work when triggered by other users. In debugging it I found the following:
- as both users the view returns the correct result rows, ie. $view->result is identical for both users.
- as admin the view object contains a list of the fields which business_rules uses, ie. $fields = $view->field is an array keyed on 'mail';
- as any other user $view->field is empty UNLESS I turn on administer users permissions for that user's role!
I am thinking that in views a permission to view the mail field is being checked when the 'fields' are populated into the view object. But, oddly enough that permission does not effect the view result as mentioned in #1.
Any thoughts on how to debug this further?