It seems the list of items for the group add content does/can not only provide items based on permission - either site wide or group specific.
I have different group types available for users with different roles. I have set up the permissions at the site and group level for the different group types and it works where if the user clicks to add a type they don't have perms for, they get an access denied. However I don't want the create link to show up at the group level.
Could the ability to alter the items that should appear in the create links be added to:
/**
* Provides a styled content creation dropdown widget for the 'all'
* tab of the group homepage browsing widget.
*/
function commons_bw_create_all_widget($group) {
$links = array();
// Collect definitions from implementing modules.
$items = module_invoke_all('commons_bw_create_all_widget', $group);
drupal_alter('commons_bw_create_all_widget', $group, $items);
Comments
Comment #1
dsdeiz commentedYeah, I agree. Also had similar situation. I wanted to adjust different widgets & tabs per group content type. Patch attached.
Edit: I might've spoke too soon. Looks like this function isn't used anywhere anymore?
Comment #2
RobKoberg commentedI think it might be better to do it in commons_bw_generate_group_widget. See this conversation with myself https://drupal.org/node/2003006
Comment #3
japerrymarking as duplicate of #2003006: commons browsing widget: add ability to alter $settings and $tabs (with patch) per that discussion an RobKoberg's comments.