It seems like view display Access Control settings aren't being respected for viewreference blocks. (only blocks, pages are fine) I've used Permissions and Roles in the Access Control settings but all seem ignored. It could very well be something in my environment, but I'm starting to think it might be the way viewreference embeds views. (and yes, I've made sure Access All Views permission is not enabled)

I ended up adding this snippet to view headers/empty text, to make Access Control work (kinda - obviously view results would still appear).

$view = views_get_current_view();
$access = $view->access($view->current_display);
if (!$access) return;

Anyone else noticing this?

Comments

danielb’s picture

hmm that's actually quite possible, I didn't consider that at all

danielb’s picture

really all that is needed is a check for $view->access($display_id) in the theme func

danielb’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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