ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.SkillManagementAccess.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
28{
29 protected \ilRbacSystem $access;
30 protected int $skmg_ref_id = 0;
31 protected int $usr_id = 0;
32
34 {
35 $this->access = $access;
36 $this->skmg_ref_id = $skmg_ref_id;
37 $this->usr_id = $usr_id;
38 }
39
40 public function hasReadManagementPermission(int $a_usr_id = 0): bool
41 {
42 if ($a_usr_id == 0) {
43 $a_usr_id = $this->usr_id;
44 }
45 return $this->access->checkAccessOfUser($a_usr_id, "visible,read", $this->skmg_ref_id);
46 }
47
48 public function hasEditManagementSettingsPermission(int $a_usr_id = 0): bool
49 {
50 if ($a_usr_id == 0) {
51 $a_usr_id = $this->usr_id;
52 }
53 return $this->access->checkAccessOfUser($a_usr_id, "write", $this->skmg_ref_id);
54 }
55
56 public function hasEditManagementPermissionsPermission(int $a_usr_id = 0): bool
57 {
58 if ($a_usr_id == 0) {
59 $a_usr_id = $this->usr_id;
60 }
61 return $this->access->checkAccessOfUser($a_usr_id, "edit_permission", $this->skmg_ref_id);
62 }
63
64 public function hasCreateTreePermission(int $a_usr_id = 0): bool
65 {
66 if ($a_usr_id == 0) {
67 $a_usr_id = $this->usr_id;
68 }
69 return $this->access->checkAccessOfUser($a_usr_id, "create_skee", $this->skmg_ref_id);
70 }
71}
__construct(\ilRbacSystem $access, int $skmg_ref_id, int $usr_id)
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...