steffen: server/kolab-webadmin/kolab-webadmin/www/admin/user user.php, 1.36, 1.37

cvs at intevation.de cvs at intevation.de
Thu Sep 30 01:03:39 CEST 2004


Author: steffen

Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user
In directory doto:/tmp/cvs-serv18259/kolab-webadmin/www/admin/user

Modified Files:
	user.php 
Log Message:
enable invitation automation for regular users

Index: user.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user/user.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- user.php	28 Sep 2004 22:46:22 -0000	1.36
+++ user.php	29 Sep 2004 23:03:37 -0000	1.37
@@ -171,35 +171,29 @@
   }
   $form->entries['accttype']['attrs'] = 'readonly';
 
-  // resourceaction
-  if( $form->entries['accttype']['value'] == 0 ) {
-	// regular user
-	unset($form->entries['resourceaction']);
-  } else {
-	// group or resource
-	$policies = array();
-	for( $i = 0; $i < $ldap_object['kolabInvitationPolicy']['count']; $i++ ) {
-	  $resact = $ldap_object['kolabInvitationPolicy'][$i];
-	  debug("resact=$resact");
-	  if( ereg( '(.*):(.*)', trim($resact), $regs ) ) {
-		$user = trim($regs[1]);
-		$pol  = trim($regs[2]);
-		if( empty($user) ) continue;
-	  } else {
-		$user = 'anyone';
-		$pol = trim($resact);
-	  }
-	  if( $form->entries['accttype']['value'] == 1 ) {
-		// default for groups
-		$pol = policy2number( $pol, 3 );
-	  } else {
-		// default for resources
-		$pol = policy2number( $pol, 2 );
-	  }
-	  $policies[$user] = $pol;
+  // Automatic invitation handling
+  $policies = array();
+  for( $i = 0; $i < $ldap_object['kolabInvitationPolicy']['count']; $i++ ) {
+	$resact = $ldap_object['kolabInvitationPolicy'][$i];
+	debug("resact=$resact");
+	if( ereg( '(.*):(.*)', trim($resact), $regs ) ) {
+	  $user = trim($regs[1]);
+	  $pol  = trim($regs[2]);
+	  if( empty($user) ) continue;
+	} else {
+	  $user = 'anyone';
+	  $pol = trim($resact);
 	}
-	$form->entries['resourceaction']['policies'] = $policies;
+	if( $form->entries['accttype']['value'] == 1 ) {
+	  // default for groups
+	  $pol = policy2number( $pol, 3 );
+	} else {
+	  // default for resources
+	  $pol = policy2number( $pol, 2 );
+	}
+	$policies[$user] = $pol;
   }
+  $form->entries['resourceaction']['policies'] = $policies;  
 
   // visible
   $internaldn = 'cn=internal,'.domain_dn();
@@ -332,17 +326,8 @@
 								 'value'   => 0 ),
 		  'resourceaction' => array( 'name' => _('Resource/Group Policies'),
 									 'type' => 'resourcepolicy',
-									 'policies' => array(array( 'user' => 'anyone', 'policyno' => 2 )),
-									 'comment' => _('Only applies to group and resource accounts') ),
-#		  'resourceaction' => array( 'name' => _('Resource/Group Action'),
-#									 'type' => 'select',
-#									 'options' => array( _('Always accept'), 
-#														 _('Always reject'), 
-#														 _('Reject if conflicts'), 
-#														 _('Manual if conflicts'),
-#														 _('Manual') ),
-#									 'value' => 2,
-#									 'comment' => _('Only applies to group and resource accounts') ),														 
+									 'policies' => array(array( 'user' => 'anyone', 'policyno' => 4 )),
+									 'comment' => _('For automatic invitation handling') ),
 		  'title_0' => array( 'name' => _('Title') ) );
 $entries['alias'] = array( 'name' => _('Email Aliases'), 
 						   'type' => 'textarea',





More information about the commits mailing list