Index: og.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/og/og.module,v
retrieving revision 1.53.2.42
diff -u -r1.53.2.42 og.module
--- og.module	1 Feb 2006 03:49:22 -0000	1.53.2.42
+++ og.module	2 Feb 2006 04:15:11 -0000
@@ -75,7 +75,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');
 }
 
 /**
@@ -779,8 +779,12 @@
   }
 
   $output .= form_radios(t('Subscription requests'), 'og_selective', $selective, 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 managed by an administrator.')), t('How should subscription requests be handled in this group?'));
-  $output .= form_checkbox(t('registration form'), 'og_register', 1, $register, t('Should this group be available for subscription during registration?. If checked, a corresponding checkbox will be added to the registration form.'));
-  $output .= form_checkbox(t('list in groups directory'), 'og_directory', 1, $directory, 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')) {
+    $output .= form_checkbox(t('registration form'), 'og_register', 1, $register, 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')) {
+    $output .= form_checkbox(t('list in groups directory'), 'og_directory', 1, $directory, t('Should this group appear on the %page', array('%page' => l(t('list of groups page'),'og'))));
+  }
 
   // group image
   if (module_exist('image')) {
