ILIAS
trunk Revision v11.0_alpha-1723-g8e69f309bab
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
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
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
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
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
class.ilObjFileServicesAccess.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use
ILIAS\HTTP\Services
;
22
27
class
ilObjFileServicesAccess
extends
ilObjectAccess
28
{
29
private
Services
$http
;
30
private \ilRbacSystem
$rbacsystem
;
31
35
public
function
__construct
()
36
{
37
global
$DIC
;
38
$this->rbacsystem = $DIC->rbac()->system();
39
$this->
http
= $DIC->http();
40
}
41
42
public
function
checkAccessAndThrowException
(
string
$permission): void
43
{
44
if
(!$this->
hasUserPermissionTo
($permission)) {
45
throw
new
ilException
(
'Permission denied'
);
46
}
47
}
48
49
50
public
function
hasUserPermissionTo
(
string
$permission): bool
51
{
52
return
$this->rbacsystem->checkAccess($permission, $this->
http
->request()->getQueryParams()[
'ref_id'
]);
53
}
54
}
ilException
ilObjectAccess
ilObjFileServicesAccess\checkAccessAndThrowException
checkAccessAndThrowException(string $permission)
Definition:
class.ilObjFileServicesAccess.php:42
ilObjFileServicesAccess
Class ilObjFileServicesAccess.
Definition:
class.ilObjFileServicesAccess.php:27
ilObjFileServicesAccess\$http
Services $http
Definition:
class.ilObjFileServicesAccess.php:29
Services
ILIAS\FileDelivery\http
static http()
Fetches the global http state from ILIAS.
Definition:
HttpServiceAware.php:55
ilObjFileServicesAccess\__construct
__construct()
ilObjFileServicesAccess constructor.
Definition:
class.ilObjFileServicesAccess.php:35
$DIC
global $DIC
Definition:
shib_login.php:22
ilObjFileServicesAccess\$rbacsystem
ilRbacSystem $rbacsystem
Definition:
class.ilObjFileServicesAccess.php:30
ilObjFileServicesAccess\hasUserPermissionTo
hasUserPermissionTo(string $permission)
Definition:
class.ilObjFileServicesAccess.php:50
components
ILIAS
FileServices
classes
class.ilObjFileServicesAccess.php
Generated on Sun Apr 6 2025 23:03:15 for ILIAS by
1.8.13 (using
Doxyfile
)