ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjAdministrativeNotificationAccess Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilObjAdministrativeNotificationAccess:
+ Collaboration diagram for ilObjAdministrativeNotificationAccess:

Public Member Functions

 __construct ()
 ilObjAdministrativeNotificationAccess constructor. More...
 
 checkAccessAndThrowException (string $permission)
 
 hasUserPermissionTo (string $permission)
 
- Public Member Functions inherited from ilObjectAccess
 _checkAccess (string $cmd, string $permission, int $ref_id, int $obj_id, ?int $user_id=null)
 Checks whether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More...
 
 canBeDelivered (ilWACPath $ilWACPath)
 

Protected Attributes

int $ref_id
 

Private Attributes

ilRbacSystem $rbacsystem
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectAccess
static _getCommands ()
 get commands More...
 
static _checkGoto (string $target)
 check whether goto script will succeed More...
 
static _isOffline (int $obj_id)
 Type-specific implementation of general status, has to be overwritten if object type does not support centralized offline handling. More...
 
static _preloadData (array $obj_ids, array $ref_ids)
 Preload data. More...
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilObjAdministrativeNotificationAccess

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 23 of file class.ilObjAdministrativeNotificationAccess.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjAdministrativeNotificationAccess::__construct ( )

ilObjAdministrativeNotificationAccess constructor.

Definition at line 32 of file class.ilObjAdministrativeNotificationAccess.php.

References $DIC.

33  {
34  global $DIC;
35  $this->rbacsystem = $DIC->rbac()->system();
36  $this->ref_id = $DIC->http()->wrapper()->query()->has('ref_id')
37  ? $DIC->http()->wrapper()->query()->retrieve('ref_id', $DIC->refinery()->kindlyTo()->int())
38  : null;
39  }
global $DIC
Definition: feed.php:28

Member Function Documentation

◆ checkAccessAndThrowException()

ilObjAdministrativeNotificationAccess::checkAccessAndThrowException ( string  $permission)
Exceptions
ilException

Definition at line 44 of file class.ilObjAdministrativeNotificationAccess.php.

References hasUserPermissionTo().

44  : void
45  {
46  if (!$this->hasUserPermissionTo($permission)) {
47  throw new ilException('Permission denied');
48  }
49  }
+ Here is the call graph for this function:

◆ hasUserPermissionTo()

ilObjAdministrativeNotificationAccess::hasUserPermissionTo ( string  $permission)

Definition at line 51 of file class.ilObjAdministrativeNotificationAccess.php.

Referenced by checkAccessAndThrowException().

51  : bool
52  {
53  return $this->rbacsystem->checkAccess($permission, $this->ref_id);
54  }
+ Here is the caller graph for this function:

Field Documentation

◆ $rbacsystem

ilRbacSystem ilObjAdministrativeNotificationAccess::$rbacsystem
private

◆ $ref_id

int ilObjAdministrativeNotificationAccess::$ref_id
protected

The documentation for this class was generated from the following file: