◆ __construct()
◆ canDelete()
| ILIAS\Notes\AccessManager::canDelete |
( |
Note |
$note, |
|
|
int |
$user_id = 0, |
|
|
|
$public_deletion_enabled = false |
|
) |
| |
Definition at line 58 of file class.AccessManager.php.
62 : bool {
65 }
68 $user_can_delete_their_comments = (bool)
$settings->
get(
"comments_del_user",
'0');
69 $tutor_can_delete_comments = (bool)
$settings->
get(
"comments_del_tutor",
'1');
70
72 return false;
73 }
74
75 $is_author = ($note->getAuthor() ===
$user_id);
76
78 return true;
79 }
80
81 if ($public_deletion_enabled && $note->getType() ===
Note::PUBLIC) {
82 return true;
83 }
84
85 if ($is_author && $user_can_delete_their_comments && $note->getType() ===
Note::PUBLIC) {
86 return true;
87 }
88
89
90 if ($tutor_can_delete_comments) {
93 return true;
94 }
95 }
96 }
97 return false;
98 }
static _getAllReferences(int $id)
get all reference ids for object ID
get(string $a_keyword, ?string $a_default_value=null)
get setting
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance)
◆ canEdit()
| ILIAS\Notes\AccessManager::canEdit |
( |
Note |
$note, |
|
|
int |
$user_id = 0 |
|
) |
| |
◆ $access
◆ $data
◆ $domain
◆ $repo
◆ $settings
| ilSetting ILIAS\Notes\AccessManager::$settings |
|
protected |
◆ $user_id
| int ILIAS\Notes\AccessManager::$user_id |
|
protected |
The documentation for this class was generated from the following file: