ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilObjFileServicesAccess.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
/******************************************************************************
6
*
7
* This file is part of ILIAS, a powerful learning management system.
8
*
9
* ILIAS is licensed with the GPL-3.0, you should have received a copy
10
* of said license along with the source code.
11
*
12
* If this is not the case or you just want to try ILIAS, you'll find
13
* us at:
14
* https://www.ilias.de
15
* https://github.com/ILIAS-eLearning
16
*
17
*****************************************************************************/
18
19
use
ILIAS\HTTP\Services
;
20
25
class
ilObjFileServicesAccess
extends
ilObjectAccess
26
{
27
private
Services
$http
;
28
private \ilRbacSystem
$rbacsystem
;
29
33
public
function
__construct
()
34
{
35
global
$DIC
;
36
$this->rbacsystem = $DIC->rbac()->system();
37
$this->
http
= $DIC->http();
38
}
39
40
public
function
checkAccessAndThrowException
(
string
$permission): void
41
{
42
if
(!$this->
hasUserPermissionTo
($permission)) {
43
throw
new
ilException
(
'Permission denied'
);
44
}
45
}
46
47
48
public
function
hasUserPermissionTo
(
string
$permission): bool
49
{
50
return
$this->rbacsystem->checkAccess($permission, $this->
http
->request()->getQueryParams()[
'ref_id'
]);
51
}
52
}
ilException
ilObjectAccess
ilObjFileServicesAccess\checkAccessAndThrowException
checkAccessAndThrowException(string $permission)
Definition:
class.ilObjFileServicesAccess.php:40
ilObjFileServicesAccess
Class ilObjFileServicesAccess.
Definition:
class.ilObjFileServicesAccess.php:25
ilObjFileServicesAccess\$http
Services $http
Definition:
class.ilObjFileServicesAccess.php:27
Services
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$DIC
global $DIC
Definition:
feed.php:28
ILIAS\FileDelivery\http
static http()
Fetches the global http state from ILIAS.
Definition:
HttpServiceAware.php:54
ilObjFileServicesAccess\__construct
__construct()
ilObjFileServicesAccess constructor.
Definition:
class.ilObjFileServicesAccess.php:33
ilObjFileServicesAccess\$rbacsystem
ilRbacSystem $rbacsystem
Definition:
class.ilObjFileServicesAccess.php:28
ilObjFileServicesAccess\hasUserPermissionTo
hasUserPermissionTo(string $permission)
Definition:
class.ilObjFileServicesAccess.php:48
Services
FileServices
classes
class.ilObjFileServicesAccess.php
Generated on Tue Apr 1 2025 22:02:21 for ILIAS by
1.8.13 (using
Doxyfile
)