mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 17:48:43 +02:00
- Using class labels in the UI - Data model: you may specify a set of allowed values from a query (see caller_id in bizIncident class), still not 100% used in the UI but does not generate any error - Data model: you may specify a password field (AttributePassword replacing AttributeString) - Setup: calling UserRight::Setup() right after calling UserRight::CreateAdministrator() - Setup: administrator account created with "my organization" and a dedicated contact - Menus: optimized the load of std menus (queries written in OQL to get the benefit of the query cache) - Menus: admin tools, seen only by people having the "admin" profile - Object edition: fixed bug with the display of N-N links in the form SVN:trunk[110]
75 lines
1.4 KiB
PHP
75 lines
1.4 KiB
PHP
<?php
|
|
|
|
/**
|
|
* UserRightsNull
|
|
* User management Module - say Yeah! to everything
|
|
*
|
|
* @package iTopORM
|
|
* @author Romain Quetiez <romainquetiez@yahoo.fr>
|
|
* @author Denis Flaven <denisflave@free.fr>
|
|
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
|
* @link www.itop.com
|
|
* @since 1.0
|
|
* @version 1.1.1.1 $
|
|
*/
|
|
|
|
|
|
class UserRightsNull extends UserRightsAddOnAPI
|
|
{
|
|
// Installation: create the very first user
|
|
public function CreateAdministrator($sAdminUser, $sAdminPwd)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function IsAdministrator($iUserId)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function Setup()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function Init()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function CheckCredentials($sUserName, $sPassword)
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
public function GetUserId($sUserName)
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
public function GetFilter($sUserName, $sClass)
|
|
{
|
|
$oNullFilter = new DBObjectSearch($sClass);
|
|
return $oNullFilter;
|
|
}
|
|
|
|
public function IsActionAllowed($iUserId, $sClass, $iActionCode, dbObjectSet $aInstances)
|
|
{
|
|
return UR_ALLOWED_YES;
|
|
}
|
|
|
|
public function IsStimulusAllowed($iUserId, $sClass, $sStimulusCode, dbObjectSet $aInstances)
|
|
{
|
|
return UR_ALLOWED_YES;
|
|
}
|
|
|
|
public function IsActionAllowedOnAttribute($iUserId, $sClass, $sAttCode, $iActionCode, dbObjectSet $aInstances)
|
|
{
|
|
return UR_ALLOWED_YES;
|
|
}
|
|
}
|
|
|
|
UserRights::SelectModule('UserRightsNull');
|
|
|
|
?>
|