ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
UploadSecurityFunctionsTrait.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 
26 {
27  protected function getAccess(
28  int $ref_id,
29  \ilAccessHandler $access
30  ): bool {
31  if ($ref_id !== null
32  && $access->checkAccess('write', '', $ref_id)) {
33  return true;
34  }
35 
36  return false;
37  }
38 
39  protected function getAccessFailureResult(
40  string $file_identification_parameter_name,
41  string $file_name,
42  \ilLanguage $language
43  ): HandlerResult {
44  $language->loadLanguageModule('content');
45  return new BasicHandlerResult(
46  $file_identification_parameter_name,
47  HandlerResult::STATUS_FAILED,
48  basename($file_name),
49  $language->txt('cont_no_access')
50  );
51  }
52 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
loadLanguageModule(string $a_module)
Load language module.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$ref_id
Definition: ltiauth.php:65