I am working on an access plugin for Organic Groups 7.x-2.x. My plugin seems to work for Block displays but not for Page displays. I would appreciate it of someone could take a look and let me know if there seems to be something wrong with my plugin code or if it might be a Views bug.

I have posted my patch files at http://drupal.org/node/1665296#comment-6380334. If there are any files that I can provide to help figure out the problem, just let me know.

Comments

dawehner’s picture

Status: Active » Fixed

So the general problem is that you might have understood get_access_callback() a bit wrong.

get_access_callback() is for defining the access callback in the hook_menu, so anything which
is dynamic on runtime like:

	if ($group = og_context($this->options['group_type'])) {

simply can't work.

Instead of that your access callback itself should have code like this, because the access callback is runned on
the request.

weekbeforenext’s picture

Thanks so much for your quick response! You are awesome!

Status: Fixed » Closed (fixed)

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