mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 09:08:42 +02:00
Portal: Fix missing parameter in new ScopeValidatorHelper::AddScopeToQuery() method. "Read" scope was always applied!
SVN:trunk[5872]
This commit is contained in:
@@ -553,14 +553,17 @@ class ScopeValidatorHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the scope query (view or edit depending on $sAction) for $sClass to the $oQuery.
|
||||
*
|
||||
* @param DBSearch $oQuery
|
||||
* @param string $sClass
|
||||
* @param string $sAction
|
||||
*
|
||||
* @return bool true if scope exists, false if scope is null
|
||||
*/
|
||||
public function AddScopeToQuery(DBSearch &$oQuery, $sClass)
|
||||
public function AddScopeToQuery(DBSearch &$oQuery, $sClass, $sAction = UR_ACTION_READ)
|
||||
{
|
||||
$oScopeQuery = $this->GetScopeFilterForProfiles(UserRights::ListProfiles(), $sClass, UR_ACTION_READ);
|
||||
$oScopeQuery = $this->GetScopeFilterForProfiles(UserRights::ListProfiles(), $sClass, $sAction);
|
||||
if ($oScopeQuery !== null)
|
||||
{
|
||||
$oQuery = $oQuery->Intersect($oScopeQuery);
|
||||
|
||||
Reference in New Issue
Block a user