Hi,
I've enabled broadcast to group permission for authenticated users, but only the group administrator can broadcast messages to the group. (no broadcast tab in group page when viewed by an authenticated user, node/[group-nid]/broadcast gives permission denied)

Is there anything else that I should do to make this work?

Comments

farhadhf’s picture

Category: support » bug
Priority: Normal » Major

I did a little investigation in the code using xdebug, in og_perm_check_access() function :

function og_perm_check_access() {
  $args = func_get_args();
  // Permission is the last argument.
  $perm = array_pop($args);
  // Callback is one argument before the last one.
  $callback = array_pop($args);
  return call_user_func_array($callback, $args) && user_access($perm);
}

$callback is 'og_broadcast_access' which returns 0, so no matter what user_access() returns 'broadcast message to group' permission is denied.

I think this is a bug and the last line of the function should be changed to :

return call_user_func_array($callback, $args) || user_access($perm);
hefox’s picture

Category: bug » feature

If you look at the description, this module is only meant to remove permissions for administrators in a group, not allow others to gain more permissions.