Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ function c4m_og_get_group_type_name($node = NULL) {
* Implements hook_form_alter().
*/
function c4m_og_form_alter(&$form, $form_state) {

// Always expose the group ref field to site administrators, but keep the
// same access for non admins.
if (isset($form[OG_AUDIENCE_FIELD]['#access'])) {
$form[OG_AUDIENCE_FIELD]['#access'] = $form[OG_AUDIENCE_FIELD]['#access'] || c4m_user_is_site_admin();
}

if (empty($form['#node_edit_form'])
|| !og_is_group_type(
'node',
Expand Down Expand Up @@ -2206,10 +2213,6 @@ function c4m_og_node_access($node, $op, $account) {
return NODE_ACCESS_IGNORE;
}

if (c4m_og_get_group_status($group) != 'pending') {
return NODE_ACCESS_IGNORE;
}

$group_access = node_access($group, $op, $account);

return $group_access ? NODE_ACCESS_ALLOW : NODE_ACCESS_DENY;
Expand Down