ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilWikiPerm Class Reference

Permission wrapper for wikis. More...

+ Collaboration diagram for ilWikiPerm:

Static Public Member Functions

static check ($a_perm, $a_ref_id, $a_cmd="")
 Check permission. More...
 

Detailed Description

Permission wrapper for wikis.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 12 of file class.ilWikiPerm.php.

Member Function Documentation

◆ check()

static ilWikiPerm::check (   $a_perm,
  $a_ref_id,
  $a_cmd = "" 
)
static

Check permission.

Parameters
string$a_permpermission
int$a_ref_idref id
Returns
bool true/false

Definition at line 21 of file class.ilWikiPerm.php.

References $DIC.

Referenced by ilWikiPageGUI\blockWikiPage(), ilObjWikiGUI\checkPermissionBool(), ilWikiPageGUI\confirmWikiPageDeletion(), ilWikiPageGUI\deleteWikiPageConfirmationScreen(), ilWikiFunctionsBlockGUI\fillDataSection(), ilWikiImportantPagesBlockGUI\getHTML(), and ilWikiPageGUI\unblockWikiPage().

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  }
global $DIC
Definition: saml.php:7
+ Here is the caller graph for this function:

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