Ver Fonte

Acl fix urls

Piotr Labudda há 10 anos atrás
pai
commit
c1c7d999e1
1 ficheiros alterados com 6 adições e 8 exclusões
  1. 6 8
      SE/se-lib/UserAcl.php

+ 6 - 8
SE/se-lib/UserAcl.php

@@ -203,7 +203,6 @@ class UserAcl {
 
 
 				$ret_array[] = $CHILD;
 				$ret_array[] = $CHILD;
 				if ($dbg) { echo '<p style="margin:0;">' . "-- find_in_tree_parent_rec(tree, $parent_id, ret, $dbg, $rec_limit) crm_proces_usera_uzyty: [" . implode(', ', $ret_array) . "]"  .'</p>'; }
 				if ($dbg) { echo '<p style="margin:0;">' . "-- find_in_tree_parent_rec(tree, $parent_id, ret, $dbg, $rec_limit) crm_proces_usera_uzyty: [" . implode(', ', $ret_array) . "]"  .'</p>'; }
-				// TODO: $ret_array będize mial tylko wartosci z ostatniego wyszukiwania
 				$this->find_in_tree_parent_rec($tree, $CHILD, $ret_array, $dbg, $rec_limit);
 				$this->find_in_tree_parent_rec($tree, $CHILD, $ret_array, $dbg, $rec_limit);
 			}
 			}
 		}
 		}
@@ -262,7 +261,7 @@ class UserAcl {
 	}
 	}
 
 
 	public function getUrls() {
 	public function getUrls() {
-		$urls = $this->_cache_read('foundUrls');// TODO: old ['MENU_SELECT_PROCES_DATA']['MENU_COLUMN']
+		$urls = $this->_cache_read('foundUrls');
 		if (empty($urls)) $urls = array();
 		if (empty($urls)) $urls = array();
 		return $urls;
 		return $urls;
 	}
 	}
@@ -351,7 +350,7 @@ class UserAcl {
 			$procesID = (int)$type;
 			$procesID = (int)$type;
 		}
 		}
 
 
-		{// TODO: fetch from schema files
+		{// fetch from schema files in SE/schema/process/*.ini.php
 		if ($schemaReader->hasProcessConfigs()) {
 		if ($schemaReader->hasProcessConfigs()) {
 			foreach ($schemaReader->getProcessConfigs() as $process) {
 			foreach ($schemaReader->getProcessConfigs() as $process) {
 				DBG::_('DBG_SCH', '1', "process", $process, __CLASS__, __FUNCTION__, __LINE__ );
 				DBG::_('DBG_SCH', '1', "process", $process, __CLASS__, __FUNCTION__, __LINE__ );
@@ -364,9 +363,6 @@ class UserAcl {
 						DBG::_('DBG_SCH', '1', "table(" . $vTable->getLabel() . ")", $zasobTblInfo, __CLASS__, __FUNCTION__, __LINE__ );
 						DBG::_('DBG_SCH', '1', "table(" . $vTable->getLabel() . ")", $zasobTblInfo, __CLASS__, __FUNCTION__, __LINE__ );
 						if ($zasobTblInfo) {
 						if ($zasobTblInfo) {
 							$idTable = $zasobTblInfo->ID;
 							$idTable = $zasobTblInfo->ID;
-							// TODO: use $vTableAcl = TableAcl::buildInstance($idTable, $tableConfig);
-							// TODO: then $vTableAcl->init();// to save table fields
-
 							if (!array_key_exists($idTable, $foundTbls)) {
 							if (!array_key_exists($idTable, $foundTbls)) {
 								$tableConfig = array();
 								$tableConfig = array();
 								$tableConfig['ID_TABLE'] = $idTable;
 								$tableConfig['ID_TABLE'] = $idTable;
@@ -458,7 +454,10 @@ SQL;
 				$userAccessForUrls[$h['ID_URL']] = $h;
 				$userAccessForUrls[$h['ID_URL']] = $h;
 			}
 			}
 			//echo'<pre>$userAccessForUrls ';print_r($userAccessForUrls);echo'</pre>';
 			//echo'<pre>$userAccessForUrls ';print_r($userAccessForUrls);echo'</pre>';
-			//TODO: $foundUrls = $userAccessForUrls;
+			DBG::_('DBG_SCH', '2', "userAccessForUrls", $userAccessForUrls, __CLASS__, __FUNCTION__, __LINE__ );
+			foreach ($userAccessForUrls as $idUrl => $vUrlConfig) {
+				$foundUrls[$idUrl] = $vUrlConfig['opis'];
+			}
 		}
 		}
 
 
 		$this->_cache_save('foundUrls', $foundUrls);
 		$this->_cache_save('foundUrls', $foundUrls);
@@ -530,7 +529,6 @@ SQL;
 
 
 		$idUserGroupList = $this->getUsedUserGroupIds();
 		$idUserGroupList = $this->getUsedUserGroupIds();
 		$sqlIdUserGroupList = implode(",", $idUserGroupList);
 		$sqlIdUserGroupList = implode(",", $idUserGroupList);
-		// TODO: acl filtr by proces id
 		return <<<SQL
 		return <<<SQL
 			select gi.`ID_PROCES`
 			select gi.`ID_PROCES`
 				from `CRM_PROCES_idx_GROUP_to_PROCES` gi
 				from `CRM_PROCES_idx_GROUP_to_PROCES` gi