mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
78 lines
1.9 KiB
PHP
78 lines
1.9 KiB
PHP
<?php
|
|
|
|
// Copyright (C) 2010-2024 Combodo SAS
|
|
//
|
|
// This file is part of iTop.
|
|
//
|
|
// iTop is free software; you can redistribute it and/or modify
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// iTop is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU Affero General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
/**
|
|
* UserRightsNull
|
|
* User management Module - say Yeah! to everything
|
|
*
|
|
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
|
* @license http://opensource.org/licenses/AGPL-3.0
|
|
*/
|
|
|
|
class UserRightsNull extends UserRightsAddOnAPI
|
|
{
|
|
// Installation: create the very first user
|
|
public function CreateAdministrator($sAdminUser, $sAdminPwd, $sLanguage = 'EN US')
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function IsAdministrator($oUser)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function IsPortalUser($oUser)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function Init()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function GetSelectFilter($oUser, $sClass, $aSettings = [])
|
|
{
|
|
$oNullFilter = new DBObjectSearch($sClass);
|
|
return $oNullFilter;
|
|
}
|
|
|
|
public function IsActionAllowed($oUser, $sClass, $iActionCode, $oInstanceSet = null)
|
|
{
|
|
return UR_ALLOWED_YES;
|
|
}
|
|
|
|
public function IsStimulusAllowed($oUser, $sClass, $sStimulusCode, $oInstanceSet = null)
|
|
{
|
|
return UR_ALLOWED_YES;
|
|
}
|
|
|
|
public function IsActionAllowedOnAttribute($oUser, $sClass, $sAttCode, $iActionCode, $oInstanceSet = null)
|
|
{
|
|
return UR_ALLOWED_YES;
|
|
}
|
|
|
|
public function FlushPrivileges()
|
|
{
|
|
}
|
|
}
|
|
|
|
UserRights::SelectModule('UserRightsNull');
|