Index: og.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/og/og.module,v retrieving revision 1.124 diff -u -r1.124 og.module --- og.module 31 Jan 2006 01:51:20 -0000 1.124 +++ og.module 2 Feb 2006 04:14:20 -0000 @@ -76,7 +76,7 @@ } function og_perm() { - return array('create groups', 'administer organic groups'); + return array('create groups', 'administer organic groups', 'show groups on registration form', 'hide groups from directory'); } /** @@ -778,8 +778,12 @@ } $form['og_selective'] = array('#type' => 'radios', '#title' => t('Subscription requests'), '#default_value' => $selective, '#options' => array(t('open - subscription requests are accepted immediately.'), t('moderated - subscription requests must be approved.'), t('invite only - subscriptions must be created by an administrator.'), t('closed - subscriptions are fully administered by an administrator.')), '#description' => t('How should subscription requests be handled in this group? When you select closed, users will not be able to subscribe nor unsubscribe.')); - $form['og_register'] = array('#type' => 'checkbox', '#title' => t('registration form'), '#default_value' => $register, '#description' =>t('Should this group be available for subscription during registration?. If checked, a corresponding checkbox will be added to the registration form.')); - $form['og_directory'] = array('#type' => 'checkbox', '#title' => t('list in groups directory'), '#default_value' => $directory, '#description' => t('Should this group appear on the %page', array('%page' => l(t('list of groups page'),'og')))); + if (user_access('show groups on registration form')) { + $form['og_register'] = array('#type' => 'checkbox', '#title' => t('registration form'), '#default_value' => $register, '#description' =>t('Should this group be available for subscription during registration?. If checked, a corresponding checkbox will be added to the registration form.')); + } + if (user_access('hide groups from directory')) { + $form['og_directory'] = array('#type' => 'checkbox', '#title' => t('list in groups directory'), '#default_value' => $directory, '#description' => t('Should this group appear on the %page', array('%page' => l(t('list of groups page'),'og')))); + } // group image // NOT WORKING YET!!!