og_ui.module has a hook_menu item

$items['group/%/%/subscribe']['access callback'] = 'user_is_logged_in';

However, almost all the other menu items use og_ui_user_access_group, such as

$items['group/%/%/unsubscribe']['access callback'] = 'og_ui_user_access_group';

For consistency's sake, and to make it easier to implement hook_og_user_access_alter(), I would like to see subscribe use the same access callback. Thus, it would end up looking like:

  $items['group/%/%/subscribe'] = array(
    'type' => MENU_CALLBACK,
    'file' => 'og_ui.pages.inc',
    'page callback' => 'og_ui_subscribe',
    'page arguments' => array(1, 2),
    'access callback' => 'og_ui_user_access_group',
    'access arguments' => array('subscribe', 1, 2),
    'title' => 'Join group',
  );

This isn't intended to be a patch; I recognize that there will be other code modifications as well. If you are open to the suggestion, I am willing to have a look at things and put a patch together. Please do make any comments about things that I may be overlooking with this request.

Comments

vegantriathlete’s picture

Issue summary: View changes