123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?php
- // Copyright (C) 2010-2012 Combodo SARL
- //
- // 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-2012 Combodo SARL
- * @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 = array())
- {
- $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');
- ?>
|