ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilWikiPerm.php
Go to the documentation of this file.
1 <?php
2 
24 {
25  public static function check(
26  string $a_perm,
27  int $a_ref_id,
28  string $a_cmd = ""
29  ): bool {
30  global $DIC;
31 
32  $ilAccess = $DIC->access();
33  switch ($a_perm) {
34  case "edit_wiki_navigation":
35  return ($ilAccess->checkAccess("write", "", $a_ref_id)
36  || $ilAccess->checkAccess("edit_wiki_navigation", "", $a_ref_id));
37  case "delete_wiki_pages":
38  return ($ilAccess->checkAccess("write", "", $a_ref_id)
39  || $ilAccess->checkAccess("delete_wiki_pages", "", $a_ref_id));
40  case "activate_wiki_protection":
41  return ($ilAccess->checkAccess("write", "", $a_ref_id)
42  || $ilAccess->checkAccess("activate_wiki_protection", "", $a_ref_id));
43  case "wiki_html_export":
44  return ($ilAccess->checkAccess("write", "", $a_ref_id)
45  || $ilAccess->checkAccess("wiki_html_export", "", $a_ref_id));
46  }
47  return $ilAccess->checkAccess($a_perm, $a_cmd, $a_ref_id);
48  }
49 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
static check(string $a_perm, int $a_ref_id, string $a_cmd="")