mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
Improved the run query page: added meaningfull examples, including "ticket of the user currently logged in", and did some cosmetics on the page (examples shown in a drawer) ; needed to add some options to the OQL (date intervals)
SVN:trunk[122]
This commit is contained in:
@@ -50,6 +50,7 @@ abstract class UserRightsAddOnAPI
|
||||
abstract public function Init(); // loads data (possible optimizations)
|
||||
abstract public function CheckCredentials($sLogin, $sPassword); // returns the id of the user or false
|
||||
abstract public function GetUserId($sLogin); // returns the id of the user or false
|
||||
abstract public function GetContactId($sLogin); // returns the id of the "business" user or false
|
||||
abstract public function GetFilter($sLogin, $sClass); // returns a filter object
|
||||
abstract public function IsActionAllowed($iUserId, $sClass, $iActionCode, dbObjectSet $oInstances);
|
||||
abstract public function IsStimulusAllowed($iUserId, $sClass, $sStimulusCode, dbObjectSet $oInstances);
|
||||
@@ -171,6 +172,16 @@ class UserRights
|
||||
}
|
||||
}
|
||||
|
||||
public static function GetContactId($sName = '')
|
||||
{
|
||||
// note: returns null if the user management module is not related to the business data model
|
||||
if (empty($sName))
|
||||
{
|
||||
$sName = self::$m_sUser;
|
||||
}
|
||||
return self::$m_oAddOn->GetContactId($sName);
|
||||
}
|
||||
|
||||
public static function GetRealUser()
|
||||
{
|
||||
return self::$m_sRealUser;
|
||||
|
||||
Reference in New Issue
Block a user