ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ILIAS\Skill\Access\SkillTreeAccess Class Reference

Skill tree access. More...

+ Collaboration diagram for ILIAS\Skill\Access\SkillTreeAccess:

Public Member Functions

 __construct (\ilRbacSystem $access, int $ref_id, int $usr_id)
 
 hasVisibleTreePermission (int $a_usr_id=0)
 
 hasReadTreePermission (int $a_usr_id=0)
 
 hasEditTreeSettingsPermission (int $a_usr_id=0)
 
 hasEditTreePermissionsPermission (int $a_usr_id=0)
 
 hasReadCompetencesPermission (int $a_usr_id=0)
 
 hasManageCompetencesPermission (int $a_usr_id=0)
 
 hasManageCompetenceTemplatesPermission (int $a_usr_id=0)
 
 hasReadProfilesPermission (int $a_usr_id=0)
 
 hasManageProfilesPermission (int $a_usr_id=0)
 

Protected Attributes

ilRbacSystem $access
 
int $ref_id = 0
 
string $obj_type = ""
 
int $usr_id = 0
 

Detailed Description

Skill tree access.

Author
Thomas Famula famul.nosp@m.a@le.nosp@m.ifos..nosp@m.de

Definition at line 28 of file class.SkillTreeAccess.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Skill\Access\SkillTreeAccess::__construct ( \ilRbacSystem  $access,
int  $ref_id,
int  $usr_id 
)

Definition at line 35 of file class.SkillTreeAccess.php.

References ILIAS\Skill\Access\SkillTreeAccess\$access, ILIAS\Skill\Access\SkillTreeAccess\$ref_id, ILIAS\Skill\Access\SkillTreeAccess\$usr_id, ilObject\_lookupType(), and ILIAS\Repository\access().

36  {
37  $this->access = $access;
38  $this->ref_id = $ref_id;
39  $this->obj_type = \ilObject::_lookupType($this->ref_id, true);
40  $this->usr_id = $usr_id;
41  }
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:

Member Function Documentation

◆ hasEditTreePermissionsPermission()

ILIAS\Skill\Access\SkillTreeAccess::hasEditTreePermissionsPermission ( int  $a_usr_id = 0)

Definition at line 67 of file class.SkillTreeAccess.php.

References ILIAS\Skill\Access\SkillTreeAccess\$usr_id, and ILIAS\Repository\access().

67  : bool
68  {
69  if ($a_usr_id == 0) {
70  $a_usr_id = $this->usr_id;
71  }
72  return $this->access->checkAccessOfUser($a_usr_id, "edit_permission", $this->ref_id);
73  }
+ Here is the call graph for this function:

◆ hasEditTreeSettingsPermission()

ILIAS\Skill\Access\SkillTreeAccess::hasEditTreeSettingsPermission ( int  $a_usr_id = 0)

Definition at line 59 of file class.SkillTreeAccess.php.

References ILIAS\Skill\Access\SkillTreeAccess\$usr_id, and ILIAS\Repository\access().

59  : bool
60  {
61  if ($a_usr_id == 0) {
62  $a_usr_id = $this->usr_id;
63  }
64  return $this->access->checkAccessOfUser($a_usr_id, "write", $this->ref_id);
65  }
+ Here is the call graph for this function:

◆ hasManageCompetencesPermission()

ILIAS\Skill\Access\SkillTreeAccess::hasManageCompetencesPermission ( int  $a_usr_id = 0)

Definition at line 83 of file class.SkillTreeAccess.php.

References ILIAS\Skill\Access\SkillTreeAccess\$usr_id, and ILIAS\Repository\access().

83  : bool
84  {
85  if ($a_usr_id == 0) {
86  $a_usr_id = $this->usr_id;
87  }
88  return $this->access->checkAccessOfUser($a_usr_id, "manage_comp", $this->ref_id);
89  }
+ Here is the call graph for this function:

◆ hasManageCompetenceTemplatesPermission()

ILIAS\Skill\Access\SkillTreeAccess::hasManageCompetenceTemplatesPermission ( int  $a_usr_id = 0)

Definition at line 91 of file class.SkillTreeAccess.php.

References ILIAS\Skill\Access\SkillTreeAccess\$usr_id, and ILIAS\Repository\access().

91  : bool
92  {
93  if ($a_usr_id == 0) {
94  $a_usr_id = $this->usr_id;
95  }
96  return $this->access->checkAccessOfUser($a_usr_id, "manage_comp_temp", $this->ref_id);
97  }
+ Here is the call graph for this function:

◆ hasManageProfilesPermission()

ILIAS\Skill\Access\SkillTreeAccess::hasManageProfilesPermission ( int  $a_usr_id = 0)

Definition at line 110 of file class.SkillTreeAccess.php.

References ILIAS\Skill\Access\SkillTreeAccess\$usr_id, and ILIAS\Repository\access().

110  : bool
111  {
112  if ($a_usr_id == 0) {
113  $a_usr_id = $this->usr_id;
114  }
115  if ($this->obj_type == "crs" || $this->obj_type == "grp") {
116  return $this->access->checkAccessOfUser($a_usr_id, "write", $this->ref_id);
117  }
118  return $this->access->checkAccessOfUser($a_usr_id, "manage_profiles", $this->ref_id);
119  }
+ Here is the call graph for this function:

◆ hasReadCompetencesPermission()

ILIAS\Skill\Access\SkillTreeAccess::hasReadCompetencesPermission ( int  $a_usr_id = 0)

Definition at line 75 of file class.SkillTreeAccess.php.

References ILIAS\Skill\Access\SkillTreeAccess\$usr_id, and ILIAS\Repository\access().

75  : bool
76  {
77  if ($a_usr_id == 0) {
78  $a_usr_id = $this->usr_id;
79  }
80  return $this->access->checkAccessOfUser($a_usr_id, "read_comp", $this->ref_id);
81  }
+ Here is the call graph for this function:

◆ hasReadProfilesPermission()

ILIAS\Skill\Access\SkillTreeAccess::hasReadProfilesPermission ( int  $a_usr_id = 0)

Definition at line 99 of file class.SkillTreeAccess.php.

References ILIAS\Skill\Access\SkillTreeAccess\$usr_id, and ILIAS\Repository\access().

99  : bool
100  {
101  if ($a_usr_id == 0) {
102  $a_usr_id = $this->usr_id;
103  }
104  if ($this->obj_type == "crs" || $this->obj_type == "grp") {
105  return $this->access->checkAccessOfUser($a_usr_id, "read", $this->ref_id);
106  }
107  return $this->access->checkAccessOfUser($a_usr_id, "read_profiles", $this->ref_id);
108  }
+ Here is the call graph for this function:

◆ hasReadTreePermission()

ILIAS\Skill\Access\SkillTreeAccess::hasReadTreePermission ( int  $a_usr_id = 0)

Definition at line 51 of file class.SkillTreeAccess.php.

References ILIAS\Skill\Access\SkillTreeAccess\$usr_id, and ILIAS\Repository\access().

51  : bool
52  {
53  if ($a_usr_id == 0) {
54  $a_usr_id = $this->usr_id;
55  }
56  return $this->access->checkAccessOfUser($a_usr_id, "read", $this->ref_id);
57  }
+ Here is the call graph for this function:

◆ hasVisibleTreePermission()

ILIAS\Skill\Access\SkillTreeAccess::hasVisibleTreePermission ( int  $a_usr_id = 0)

Definition at line 43 of file class.SkillTreeAccess.php.

References ILIAS\Skill\Access\SkillTreeAccess\$usr_id, and ILIAS\Repository\access().

43  : bool
44  {
45  if ($a_usr_id == 0) {
46  $a_usr_id = $this->usr_id;
47  }
48  return $this->access->checkAccessOfUser($a_usr_id, "visible", $this->ref_id);
49  }
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilRbacSystem ILIAS\Skill\Access\SkillTreeAccess::$access
protected

◆ $obj_type

string ILIAS\Skill\Access\SkillTreeAccess::$obj_type = ""
protected

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

◆ $ref_id

int ILIAS\Skill\Access\SkillTreeAccess::$ref_id = 0
protected

◆ $usr_id


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