ILIAS  release_7 Revision v7.30-3-g800a261c036
ilObjAdministrativeNotificationAccess Class Reference

Class ilObjAdministrativeNotificationAccess. 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 ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
 Checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More...
 
 _checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id)
 check condition More...
 
 canBeDelivered (ilWACPath $ilWACPath)
 
Parameters
ilWACPath$ilWACPath
Returns
bool
More...
 

Private Attributes

 $http
 
 $rbacsystem
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjAdministrativeNotificationAccess::__construct ( )

ilObjAdministrativeNotificationAccess constructor.

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

References $DIC, and ILIAS\FileDelivery\http().

23  {
24  global $DIC;
25  $this->rbacsystem = $DIC->rbac()->system();
26  $this->http = $DIC->http();
27  }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:

Member Function Documentation

◆ checkAccessAndThrowException()

ilObjAdministrativeNotificationAccess::checkAccessAndThrowException ( string  $permission)
Parameters
string$permission
Exceptions
ilException

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

References hasUserPermissionTo().

33  : void
34  {
35  if (!$this->hasUserPermissionTo($permission)) {
36  throw new ilException('Permission denied');
37  }
38  }
+ Here is the call graph for this function:

◆ hasUserPermissionTo()

ilObjAdministrativeNotificationAccess::hasUserPermissionTo ( string  $permission)
Parameters
string$permission
Returns
bool

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

References ILIAS\FileDelivery\http().

Referenced by checkAccessAndThrowException().

44  : bool
45  {
46  return (bool) $this->rbacsystem->checkAccess($permission, $this->http->request()->getQueryParams()['ref_id']);
47  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $http

ilObjAdministrativeNotificationAccess::$http
private

◆ $rbacsystem

ilObjAdministrativeNotificationAccess::$rbacsystem
private

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