Adding fields to message having node access restrictions

Created on 19 November 2014, about 10 years ago
Updated 17 September 2024, 3 months ago

If you use something like
hook_node_grants
to restrict node access all the nodes referenced in the message entity will respect the permissions and show you blanks instead of the field you want.

Related to this I guess #1804586: "Fetch entity by property" + node access = not working properly when launched by cron β†’
My solution has been to do

global $user;
  $user = user_load(1);

on hook_cron an then restore it again to anonymous

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain rodrigoaguilera Barcelona

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024