ILIAS  release_8 Revision v8.23
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 26 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 33 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().

34  {
35  $this->access = $access;
36  $this->ref_id = $ref_id;
37  $this->obj_type = \ilObject::_lookupType($this->ref_id, true);
38  $this->usr_id = $usr_id;
39  }
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 65 of file class.SkillTreeAccess.php.

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

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

◆ hasEditTreeSettingsPermission()

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

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

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

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

◆ hasManageCompetencesPermission()

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

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

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

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

◆ hasManageCompetenceTemplatesPermission()

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

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

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

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

◆ hasManageProfilesPermission()

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

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

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

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

◆ hasReadCompetencesPermission()

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

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

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

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

◆ hasReadProfilesPermission()

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

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

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

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

◆ hasReadTreePermission()

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

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

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

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

◆ hasVisibleTreePermission()

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

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

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

41  : bool
42  {
43  if ($a_usr_id == 0) {
44  $a_usr_id = $this->usr_id;
45  }
46  return $this->access->checkAccessOfUser($a_usr_id, "visible", $this->ref_id);
47  }
+ 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 30 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: