Index: /branches/2.4/workflow/inc/class.ui_userinterface.inc.php
===================================================================
--- /branches/2.4/workflow/inc/class.ui_userinterface.inc.php	(revision 3167)
+++ /branches/2.4/workflow/inc/class.ui_userinterface.inc.php	(revision 6503)
@@ -170,4 +170,7 @@
 		}
 
+		//Verifica a permissÃ£o do usuÃ¡rio
+		$so->_checkAccess($organizationID);
+
 		/* make the array flat (for a simpler handling) */
 		$flatAreas = array();
@@ -184,5 +187,5 @@
 			}
 			unset($currentArea['children']);
-
+			
 			$employees = $so->getAreaEmployees($currentArea['area_id'], $organizationID);
 			if (is_array($employees))
Index: /branches/2.4/workflow/inc/class.so_userinterface.inc.php
===================================================================
--- /branches/2.4/workflow/inc/class.so_userinterface.inc.php	(revision 5242)
+++ /branches/2.4/workflow/inc/class.so_userinterface.inc.php	(revision 6503)
@@ -13,5 +13,28 @@
 	 */
 	var $db;
-
+	/**
+	 * @var bool True se o usuÃ¡rio for administrador do expresso.
+	 * @access private
+	 */
+	private $isAdmin;
+
+	/**
+	 * @var int ID do usuÃ¡rio logado no Expresso
+	 * @access private
+	 */
+	private $userID;
+
+	/**
+	 * @var object Link para a ACL do Workflow.
+	 * @access private
+	 */
+	private $acl;
+	
+	/**
+	 * @var bool indicando se o usuÃ¡rio possui ou nÃ£o acesso aos dados restritos.
+	 * @access private
+	 */
+	private	$authorized;
+	
 	/**
 	 * Constructor
@@ -21,4 +44,8 @@
 	function so_userinterface()
 	{
+		$this->authorized= false;
+		$this->userID = $_SESSION['phpgw_info']['workflow']['account_id'];
+		$this->isAdmin = $_SESSION['phpgw_info']['workflow']['user_is_admin'];
+		$this->acl = Factory::getInstance('workflow_acl');
 		$this->db =& Factory::getInstance('WorkflowObjects')->getDBWorkflow()->Link_ID;
 		$this->db->SetFetchMode(ADODB_FETCH_ASSOC);
@@ -218,4 +245,23 @@
 
 		return $output;
+	}	
+
+	/**
+	 * Checa se o usuÃ¡rio possui permissÃ£o para visualizar informaÃ§Ãµes restritas.
+	 * @param int $organizationID O ID da organizaÃ§Ã£o do Orgranograma.
+	 * @return void
+	 * @access public
+	 */
+	public function _checkAccess($organizationID = null)
+	{
+		/* the user is an administrator */
+		if ($this->isAdmin)
+			$this->authorized=true;
+
+		if (!is_numeric($organizationID))
+			$this->authorized = false;
+		else
+			$this->authorized = $this->acl->checkUserAccessToResource('ORG', $this->userID, (int) $organizationID, 1);
+		
 	}
 
@@ -232,4 +278,7 @@
 		$areaID = (int) $areaID;
 
+		require_once dirname(__FILE__) . '/local/classes/class.wf_orgchart.php';
+		$orgchart = new wf_orgchart();
+		
 		/* gather some info from the area */
 		$areaInfo = $this->db->query('SELECT COALESCE(a.titular_funcionario_id, -1) AS titular_funcionario_id, COALESCE(s.funcionario_id, -1) AS substituto_funcionario_id FROM area a LEFT OUTER JOIN substituicao s ON ((a.area_id = s.area_id) AND (CURRENT_DATE BETWEEN s.data_inicio AND s.data_fim)) WHERE (a.organizacao_id = ?) AND (a.area_id = ?)', array($organizationID, $areaID))->GetArray(-1);
@@ -252,5 +301,5 @@
 			for ($j = 0; $j < $result->_numOfFields; $j++)
 				unset($employees[$i][$j]);
-
+			
 			$employees[$i]['cn'] = '';
 			$employees[$i]['telephoneNumber'] = '';
@@ -268,4 +317,25 @@
 				$employees[$i]['removed'] = is_null($entry['last_update']);
 			}
+			
+			/*busca o cargo do funcionario*/
+			$employeeInfo = $orgchart->getEmployee($employees[$i]['funcionario_id']);
+
+			$cargo = '';
+
+			if ($this->authorized && !empty($employeeInfo['cargo_id']))
+			{
+				$jobTitleInfo = $orgchart->getJobTitle($employeeInfo['cargo_id']);
+				$cargo = $jobTitleInfo['descricao'];
+			}
+			$employees[$i]['cargo'] = utf8_encode($cargo);	
+			
+			/*busca o vÃ­nculo do funcionario*/
+			$vinculo = '';
+			if ($this->authorized && !empty($employeeInfo['funcionario_categoria_id']))
+			{
+				$categoryInfo = $orgchart->getEmployeeCategory($employeeInfo['funcionario_categoria_id']);
+				$vinculo=$categoryInfo['descricao'];
+			}			
+			$employees[$i]['vinculo'] = utf8_encode($vinculo);
 
 			/* count the number of employees in each category */
@@ -274,5 +344,5 @@
 				$categoriesCount[$categoryID]++;
 			else
-				$categoriesCount[$categoryID] = 1;
+				$categoriesCount[$categoryID] = 1;					
 		}
 		$usedCategories = array_keys($categoriesCount);
Index: /branches/2.4/workflow/js/userinterface/orgchartPrint.js
===================================================================
--- /branches/2.4/workflow/js/userinterface/orgchartPrint.js	(revision 5739)
+++ /branches/2.4/workflow/js/userinterface/orgchartPrint.js	(revision 6503)
@@ -99,5 +99,5 @@
 							.append(areas[area_id].employees[user_id].cn)
 						)
-							.css('width', '55%')
+							.css('width', '30%')
 			);
 
@@ -106,5 +106,5 @@
 		element.append(
 						$('<td>' + areas[area_id].sigla + '</td>')
-							.css('width', '15%')
+							.css('width', '10%')
 					);
 
@@ -112,12 +112,26 @@
 	element.append(
 					$('<td>' + areas[area_id].employees[user_id].uid + '</td>')
-						.css('width', '10%')
-					)
+						.css('width', '15%') 
+ 	                                ) 
+
 
 	/* telephone: last column */
 	element.append(
 					$('<td>' + areas[area_id].employees[user_id].telephoneNumber + '</td>')
-						.css('width', '20%')
-					)
+						.css('width', '15%') 
+ 	                                ) 
+ 		                                         
+ 	/* VÃÂ­nculo: show cargo vÃÂ­nculo */ 
+ 	element.append( 
+ 	                                $('<td>' + areas[area_id].employees[user_id].vinculo + '</td>') 
+ 	                                        .css('width', '15%') 
+ 	                                ) 
+ 		 
+ 	/* Cargo: show cargo attribute */ 
+ 	element.append( 
+ 	                                $('<td>' + areas[area_id].employees[user_id].cargo + '</td>') 
+ 	                                        .css('width', '15%') 
+ 	                                ) 
+ 		 
 				.addClass('employees');
 
Index: /branches/2.4/workflow/js/adminaccess/main.js
===================================================================
--- /branches/2.4/workflow/js/adminaccess/main.js	(revision 3255)
+++ /branches/2.4/workflow/js/adminaccess/main.js	(revision 6503)
@@ -34,5 +34,5 @@
 permissionListORG[0]['name'] = "Administrar Organograma";
 permissionListORG[0]['value'] = 0;
-permissionListORG[1]['name'] = "Visualizar Telefones Pessoais";
+permissionListORG[1]['name'] = "Visualizar InformaÃ§Ãµes Restritas";
 permissionListORG[1]['value'] = 1;
 
