ILIAS
trunk Revision v12.0_alpha-1540-g00f839d5fa1
◀ ilDoc Overview
RBACAccessCheckLegacyProxy.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\WebDAV
;
22
23
use
ILIAS\WebDAV\Objects\Filter\Action
;
24
use
ILIAS\WebDAV\Objects\Type
;
25
29
class
RBACAccessCheckLegacyProxy
implements
AccessCheck
30
{
31
public
function
hasCurrentUserAccess
(
Action
$action, ?
int
$ref_id
=
null
): bool
32
{
33
if
(
$ref_id
===
null
) {
34
return
false
;
35
}
36
try
{
37
global
$DIC
;
38
39
$access =
$DIC
->access();
40
if
($access ===
null
) {
41
return
false
;
42
}
43
44
$user =
$DIC
->user();
45
46
return
$access->checkAccessOfUser($user->getId(), $action->value,
''
,
$ref_id
);
47
}
catch
(\Throwable
$e
) {
48
return
false
;
49
}
50
}
51
52
public
function
canUserCreate
(
Type
$type, ?
int
$ref_id
=
null
): bool
53
{
54
if
(
$ref_id
===
null
) {
55
return
false
;
56
}
57
try
{
58
global
$DIC
;
59
60
$access =
$DIC
->access();
61
if
($access ===
null
) {
62
return
false
;
63
}
64
65
$user =
$DIC
->user();
66
67
return
$access->checkAccessOfUser($user->getId(),
Action::CREATE
->value .
'_'
. $type->value,
''
,
$ref_id
);
68
}
catch
(\Throwable
$e
) {
69
return
false
;
70
}
71
72
return
false
;
73
}
74
}
ILIAS\WebDAV\RBACAccessCheckLegacyProxy
Definition:
RBACAccessCheckLegacyProxy.php:30
ILIAS\WebDAV\RBACAccessCheckLegacyProxy\canUserCreate
canUserCreate(Type $type, ?int $ref_id=null)
Definition:
RBACAccessCheckLegacyProxy.php:52
ILIAS\WebDAV\RBACAccessCheckLegacyProxy\hasCurrentUserAccess
hasCurrentUserAccess(Action $action, ?int $ref_id=null)
Definition:
RBACAccessCheckLegacyProxy.php:31
ILIAS\WebDAV\AccessCheck
Definition:
AccessCheck.php:30
$ref_id
$ref_id
Definition:
ltiauth.php:66
ILIAS\AdvancedMetaData\Data\FieldDefinition\Type
Type
Definition:
Type.php:24
ILIAS\MetaData\Elements\Markers\Action
Action
Definition:
Action.php:24
ILIAS\WebDAV\Objects\Filter\Action
Action
Definition:
Action.php:27
ILIAS\WebDAV\Objects\Filter\CREATE
@ CREATE
Definition:
Action.php:31
ILIAS\WebDAV\Objects\Type
Type
Definition:
Type.php:27
ILIAS\WebDAV
Definition:
AccessCheck.php:21
Vendor\Package\$e
$e
Definition:
example_cleaned.php:49
$DIC
global $DIC
Definition:
shib_login.php:26
components
ILIAS
WebDAV
src
Access
RBACAccessCheckLegacyProxy.php
Generated on Wed Jun 3 2026 23:07:35 for ILIAS by
1.9.4 (using
Doxyfile
)