ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
ILIAS\WebDAV\RBACAccessCheckLegacyProxy Class Reference
+ Inheritance diagram for ILIAS\WebDAV\RBACAccessCheckLegacyProxy:
+ Collaboration diagram for ILIAS\WebDAV\RBACAccessCheckLegacyProxy:

Public Member Functions

 hasCurrentUserAccess (Action $action, ?int $ref_id=null)
 
 canUserCreate (Type $type, ?int $ref_id=null)
 
 hasCurrentUserAccess (Action $action, ?int $ref_id=null)
 
 canUserCreate (Type $type, ?int $ref_id=null)
 

Detailed Description

Member Function Documentation

◆ canUserCreate()

ILIAS\WebDAV\RBACAccessCheckLegacyProxy::canUserCreate ( Type  $type,
?int  $ref_id = null 
)

Implements ILIAS\WebDAV\AccessCheck.

Definition at line 52 of file RBACAccessCheckLegacyProxy.php.

52 : 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 }
$ref_id
Definition: ltiauth.php:66
global $DIC
Definition: shib_login.php:26

References $DIC, Vendor\Package\$e, $ref_id, and ILIAS\WebDAV\Objects\Filter\CREATE.

◆ hasCurrentUserAccess()

ILIAS\WebDAV\RBACAccessCheckLegacyProxy::hasCurrentUserAccess ( Action  $action,
?int  $ref_id = null 
)

Implements ILIAS\WebDAV\AccessCheck.

Definition at line 31 of file RBACAccessCheckLegacyProxy.php.

31 : 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 }

References $DIC, Vendor\Package\$e, and $ref_id.


The documentation for this class was generated from the following file: