ILIAS  release_8 Revision v8.24
class.SkillManagementAccess.php
Go to the documentation of this file.
1<?php
2
21
27{
28 protected \ilRbacSystem $access;
29 protected int $skmg_ref_id = 0;
30 protected int $usr_id = 0;
31
33 {
34 $this->access = $access;
35 $this->skmg_ref_id = $skmg_ref_id;
36 $this->usr_id = $usr_id;
37 }
38
39 public function hasReadManagementPermission(int $a_usr_id = 0): bool
40 {
41 if ($a_usr_id == 0) {
42 $a_usr_id = $this->usr_id;
43 }
44 return $this->access->checkAccessOfUser($a_usr_id, "visible,read", $this->skmg_ref_id);
45 }
46
47 public function hasEditManagementSettingsPermission(int $a_usr_id = 0): bool
48 {
49 if ($a_usr_id == 0) {
50 $a_usr_id = $this->usr_id;
51 }
52 return $this->access->checkAccessOfUser($a_usr_id, "write", $this->skmg_ref_id);
53 }
54
55 public function hasEditManagementPermissionsPermission(int $a_usr_id = 0): bool
56 {
57 if ($a_usr_id == 0) {
58 $a_usr_id = $this->usr_id;
59 }
60 return $this->access->checkAccessOfUser($a_usr_id, "edit_permission", $this->skmg_ref_id);
61 }
62
63 public function hasCreateTreePermission(int $a_usr_id = 0): bool
64 {
65 if ($a_usr_id == 0) {
66 $a_usr_id = $this->usr_id;
67 }
68 return $this->access->checkAccessOfUser($a_usr_id, "create_skee", $this->skmg_ref_id);
69 }
70}
__construct(\ilRbacSystem $access, int $skmg_ref_id, int $usr_id)
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...