Index: branches/2.2/expressoAdmin1_2/inc/class.db_functions.inc.php
===================================================================
--- branches/2.2/expressoAdmin1_2/inc/class.db_functions.inc.php	(revision 1516)
+++ branches/2.2/expressoAdmin1_2/inc/class.db_functions.inc.php	(revision 3251)
@@ -432,4 +432,11 @@
 			$return['members'] = array();
 
+		//  ACL	Block Personal Data
+		$query = "SELECT acl_rights FROM phpgw_acl WHERE acl_location = 'blockpersonaldata' AND acl_account = '" . $gidnumber . "'";
+		$this->db->query($query);
+		if($this->db->next_record()) {
+			$block_personal_data = $this->db->row();
+			$return['acl_block_personal_data'] = $block_personal_data['acl_rights'];
+		}
 		return $return;
 	}
@@ -736,4 +743,19 @@
 		return;
 	}
+	function save_acl_personal_data($gidnumber, $new_acl_personal_data, $op = '') {
+		if($op == 'add')
+			$sql = "INSERT INTO phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) "
+				. "VALUES('preferences','blockpersonaldata','$gidnumber',$new_acl_personal_data)";		
+		elseif($op == 'remove')
+			$sql = "DELETE FROM phpgw_acl WHERE acl_account = '$gidnumber' and acl_location = 'blockpersonaldata'";
+		else
+			$sql = "UPDATE phpgw_acl SET acl_rights = $new_acl_personal_data WHERE acl_account = '$gidnumber' "
+				. "and acl_location = 'blockpersonaldata'";
+				
+		//error_log($sql);
+		$this->db->query($sql);
+		
+		return;
+	}
 	
 }
Index: branches/2.2/expressoAdmin1_2/inc/class.group.inc.php
===================================================================
--- branches/2.2/expressoAdmin1_2/inc/class.group.inc.php	(revision 587)
+++ branches/2.2/expressoAdmin1_2/inc/class.group.inc.php	(revision 3251)
@@ -135,4 +135,12 @@
 				$return['msg'] .= $result['msg'];
 			}
+			// PERSONAL DATA FIELDS TO BLOCK.
+			if(is_array($params['acl_block_personal_data'])){
+				$acl_personal_data = 0;
+				foreach($params['acl_block_personal_data'] as $i => $data_field){
+					$acl_personal_data |= intval($data_field);
+				}
+				$this->db_functions->save_acl_personal_data($id, $acl_personal_data, 'add');
+			}
 			
 			if ($return['status'] == true)
@@ -419,5 +427,27 @@
 					$this->db_functions->write_log("removed application from group","$app: $dn");
 			}
-			//////////////////////////////////////////////////////////////////////////////////////////////////////////////////			
+			//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+			// PERSONAL DATA FIELDS TO BLOCK.
+			$old_acl_personal_data = intval($old_values['acl_block_personal_data']);
+			$new_acl_personal_data = 0;
+			if(is_array($new_values['acl_block_personal_data'])){				
+				foreach($new_values['acl_block_personal_data'] as $i => $data_field){
+					$new_acl_personal_data |= intval($data_field);
+				}
+			}
+			if($new_acl_personal_data != $old_acl_personal_data){
+				if($new_acl_personal_data > 0 && $old_acl_personal_data == 0) {
+					$this->db_functions->save_acl_personal_data($new_values['gidnumber'], $new_acl_personal_data, 'add');
+					$this->db_functions->write_log("added ACL block personal data to group","dn:$dn -> acl: $new_acl_personal_data");
+				}
+				elseif($new_acl_personal_data == 0 && $old_acl_personal_data > 0){
+					$this->db_functions->save_acl_personal_data($new_values['gidnumber'], $new_acl_personal_data, 'remove');
+					$this->db_functions->write_log("removed ACL block personal data to group","dn:$dn");
+				}
+				else{
+					$this->db_functions->save_acl_personal_data($new_values['gidnumber'], $new_acl_personal_data);
+					$this->db_functions->write_log("changed ACL block personal data to group","dn:$dn ->  acl: $old_acl_personal_data => $new_acl_personal_data");
+				}
+			}
 			
 			return $return;
Index: branches/2.2/expressoAdmin1_2/inc/class.uigroups.inc.php
===================================================================
--- branches/2.2/expressoAdmin1_2/inc/class.uigroups.inc.php	(revision 1847)
+++ branches/2.2/expressoAdmin1_2/inc/class.uigroups.inc.php	(revision 3251)
@@ -198,4 +198,6 @@
 			// Chama funcao para criar lista de aplicativos disponiveis.
 			$apps = $this->functions->make_list_app($manager_lid);
+			// Chama funcao para criar lista de campos disponiveis na edicao de dados pessoais.
+			$personal_data_fields = $this->functions->make_list_personal_data_fields($manager_lid);
 			
 			// Cria combo de dominio samba
@@ -228,4 +230,5 @@
 				'defaultDomain'				=> $this->current_config['expressoAdmin_defaultDomain'],
 				'apps'						=> $apps,
+				'personal_data_fields'		=> $personal_data_fields,
 				'use_attrs_samba_checked'	=> '',
 				'disabled_samba'			=> 'disabled',
@@ -314,4 +317,6 @@
 			// Chama funcao para criar lista de aplicativos disponiveis.
 			$apps = $this->functions->make_list_app($manager_lid, $group_info['apps']);
+			// Chama funcao para criar lista de campos disponiveis na edicao de dados pessoais.
+			$personal_data_fields = $this->functions->make_list_personal_data_fields($manager_lid, $group_info['acl_block_personal_data']);
 			
 			// Cria combo de dominios do samba
@@ -344,4 +349,5 @@
 				'description'				=> $group_info['description'],
 				'apps'						=> $apps,
+				'personal_data_fields'		=> $personal_data_fields,
 				'use_attrs_samba_checked'	=> $group_info['sambaGroup'] ? 'CHECKED' : '',
 				'disabled_samba'			=> $group_info['sambaGroup'] ? '' : 'disabled',
Index: branches/2.2/expressoAdmin1_2/inc/class.functions.inc.php
===================================================================
--- branches/2.2/expressoAdmin1_2/inc/class.functions.inc.php	(revision 1913)
+++ branches/2.2/expressoAdmin1_2/inc/class.functions.inc.php	(revision 3251)
@@ -849,4 +849,25 @@
 				return $groups_id;
 		}
+		function make_list_personal_data_fields($account_lid, $acl = '')
+		{
+			// Sem restrição nenhuma na edição dos campos pessoais	=> $acl=0;
+			// Com restrição apenas na edição do Tel. Comercial 	=> $acl=1;
+			// Com restrição apenas na edição do Tel. Celular		=> $acl=2;
+			// Com restrição na edição do Tel. Comercial e Celular	=> $acl=3;			
+			
+			$personal_data_fields = array(	
+					array("text" => lang("%1 telephone number", lang("Commercial"))	, "acl" => 1),
+					array("text" => lang("%1 telephone number", lang("Mobile"))		, "acl" => 2));
+			$list_personal_data = "<tr>";
+						
+			foreach($personal_data_fields as $i => $data_field)	{
+				$checked = ($data_field['acl'] & $acl) ? "CHECKED" : "";
+				$list_personal_data .= "<td align=right bgcolor='#DDDDDD'>{$data_field['text']}</td>".
+				"<td bgcolor='#DDDDDD' width='10'><input type='checkbox' name='acl_block_personal_data[]'".
+				" value='{$data_field['acl']}' $checked></td>";
+			}
+			$list_personal_data .= "</tr>";
+			return $list_personal_data;
+		}
 		
 		function make_list_app($account_lid, $user_applications='', $disabled='')
Index: branches/2.2/expressoAdmin1_2/templates/default/groups_form.tpl
===================================================================
--- branches/2.2/expressoAdmin1_2/templates/default/groups_form.tpl	(revision 640)
+++ branches/2.2/expressoAdmin1_2/templates/default/groups_form.tpl	(revision 3251)
@@ -99,4 +99,13 @@
 						</td>
 					</tr>
+					<tr>
+        				<td colspan="3">
+        					{lang_block_personal_data_edit}:
+        					<br>
+        					<table width="50%" border="0">
+								{personal_data_fields}
+							</table>
+						</td>
+					</tr>
 
 					<tr>
