ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilWikiPerm.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
13 {
21  public static function check($a_perm, $a_ref_id, $a_cmd = "")
22  {
23  global $DIC;
24 
25  $ilAccess = $DIC->access();
26  switch ($a_perm) {
27  case "edit_wiki_navigation":
28  return ($ilAccess->checkAccess("write", "", $a_ref_id)
29  || $ilAccess->checkAccess("edit_wiki_navigation", "", $a_ref_id));
30  case "delete_wiki_pages":
31  return ($ilAccess->checkAccess("write", "", $a_ref_id)
32  || $ilAccess->checkAccess("delete_wiki_pages", "", $a_ref_id));
33  case "activate_wiki_protection":
34  return ($ilAccess->checkAccess("write", "", $a_ref_id)
35  || $ilAccess->checkAccess("activate_wiki_protection", "", $a_ref_id));
36  case "wiki_html_export":
37  return ($ilAccess->checkAccess("write", "", $a_ref_id)
38  || $ilAccess->checkAccess("wiki_html_export", "", $a_ref_id));
39  }
40  return $ilAccess->checkAccess($a_perm, $a_cmd, $a_ref_id);
41  }
42 }
static check($a_perm, $a_ref_id, $a_cmd="")
Check permission.
global $DIC
Definition: saml.php:7
Permission wrapper for wikis.