ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilObjLTIAdministrationAccess Class Reference

Access class of the LTI administration node. More...

+ Inheritance diagram for ilObjLTIAdministrationAccess:
+ Collaboration diagram for ilObjLTIAdministrationAccess:

Static Public Member Functions

static hasOwnToolCreationAccess ()
 True when the user may define tools of their own, which is what allows creating an LTI object for a tool that is not released for everybody. More...
 
static lookupRefId ()
 The reference of the administration node, which is the only one of its type. More...
 
- 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...
 

Additional Inherited Members

- 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)
 
 canBeDelivered (ilWACPath $ilWACPath)
 

Detailed Description

Access class of the LTI administration node.

Author
Saúl Díaz sdiaz.nosp@m.@sur.nosp@m.labs..nosp@m.com

Definition at line 26 of file class.ilObjLTIAdministrationAccess.php.

Member Function Documentation

◆ hasOwnToolCreationAccess()

static ilObjLTIAdministrationAccess::hasOwnToolCreationAccess ( )
static

True when the user may define tools of their own, which is what allows creating an LTI object for a tool that is not released for everybody.

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

32 : bool
33 {
34 global $DIC;
35
36 $ref_id = self::lookupRefId();
37
38 return $ref_id !== null && $DIC->rbac()->system()->checkAccess('add_consume_provider', $ref_id);
39 }
static lookupRefId()
The reference of the administration node, which is the only one of its type.
global $DIC
Definition: shib_login.php:26

References $DIC, and lookupRefId().

Referenced by ilObjLTIToolGUI\assertOwnToolCreationAccess(), and ilObjLTIToolGUI\renderCreation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lookupRefId()

static ilObjLTIAdministrationAccess::lookupRefId ( )
static

The reference of the administration node, which is the only one of its type.

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

44 : ?int
45 {
46 global $DIC;
47
48 $db = $DIC->database();
49 $result = $db->queryF(
50 'SELECT r.ref_id FROM object_reference r'
51 . ' JOIN tree t ON t.child = r.ref_id'
52 . ' JOIN object_data d ON d.obj_id = r.obj_id'
53 . ' WHERE t.parent = %s AND d.type = %s',
54 ['integer', 'text'],
55 [SYSTEM_FOLDER_ID, 'ltis']
56 );
57 $row = $db->fetchAssoc($result);
58
59 return $row === null ? null : (int) $row['ref_id'];
60 }
const SYSTEM_FOLDER_ID
Definition: constants.php:35

References $DIC, ILIAS\Repository\int(), and SYSTEM_FOLDER_ID.

Referenced by hasOwnToolCreationAccess(), and ilLTIProviderObjectSettingGUI\hasSettingsAccess().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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