瀏覽代碼

Do not let portal users configure their lists... not bullet proof from the security point of view, but better than opening it wide.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2200 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 12 年之前
父節點
當前提交
ec0e5f9549
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      application/datatable.class.inc.php

+ 8 - 1
application/datatable.class.inc.php

@@ -71,7 +71,14 @@ class DataTable
 		}
 		}
 		$this->oSet->SetOrderBy($oCustomSettings->GetSortOrder());
 		$this->oSet->SetOrderBy($oCustomSettings->GetSortOrder());
 		
 		
-		return $this->GetAsHTML($oPage, $oCustomSettings->iDefaultPageSize, $oCustomSettings->iDefaultPageSize, 0, $oCustomSettings->aColumns, $bActionsMenu, true, $sSelectMode, $bViewLink, $aExtraParams);
+		$bToolkitMenu = true;
+		if (UserRights::IsPortalUser())
+		{
+			// Portal users have a limited access to data, for now they can only see what's configured for them
+			$bToolkitMenu = false;
+		}
+		
+		return $this->GetAsHTML($oPage, $oCustomSettings->iDefaultPageSize, $oCustomSettings->iDefaultPageSize, 0, $oCustomSettings->aColumns, $bActionsMenu, $bToolkitMenu, $sSelectMode, $bViewLink, $aExtraParams);
 	}
 	}
 	
 	
 	public function GetAsHTML(WebPage $oPage, $iPageSize, $iDefaultPageSize, $iPageIndex, $aColumns, $bActionsMenu, $bToolkitMenu, $sSelectMode, $bViewLink, $aExtraParams)
 	public function GetAsHTML(WebPage $oPage, $iPageSize, $iDefaultPageSize, $iPageIndex, $aColumns, $bActionsMenu, $bToolkitMenu, $sSelectMode, $bViewLink, $aExtraParams)