I have some custom tabs in my group pages that are built with hook_menu. Before I started using og_user_roles, the tabs showed up just as expected. For instance, a tab to create a gallery:
$items['node/%node/gallery2/add'] = array(
'page callback' => 'node_add',
'page arguments' => array('gallery'),
'access callback' => 'node_access',
'access arguments' => array('create', 'gallery'),
'description' => 'Add Gallery',
'file' => 'node.pages.inc',
'file path' => drupal_get_path('module', 'node'),
'title' => 'Add Gallery',
'type' => MENU_LOCAL_TASK,
'weight' => 10,
);
Now, it does not respect the perms the user should have in the group context. How should I set up the access callback to work correctly with og_user_roles?
Comments
Comment #1
sunWhat exactly means "it does not work" ?
Comment #2
dafederIt does not display the tab when it should. When in the context of a group that gives the user perms to add a node, the user does not see a tab letting him add the node.
I accidentally discovered that if I create a block with the following code:
the permissions are loaded correctly. But if I put that same code into the module it doesn't change anything.
Comment #3
sunAre you using 6.x-4.1?
Comment #4
fuzzy76 commentedI think this is solved in the last part of #770870: Access denied when creating node if restricted to a role assigned by og_user_roles and i18n is enabled