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.StyleAccessManager.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
21
namespace
ILIAS\Style\Content\Access
;
22
23
use
ilRbacSystem
;
24
29
class
StyleAccessManager
30
{
31
protected
bool
$enable_write
=
false
;
32
protected
int
$ref_id
= 0;
33
protected
int
$user_id
= 0;
34
protected
ilRbacSystem
$rbacsystem
;
35
36
public
function
__construct
(
ilRbacSystem
$rbacsystem = null,
int
$ref_id = 0,
int
$user_id = 0)
37
{
38
global
$DIC
;
39
40
$this->rbacsystem = (!is_null($rbacsystem))
41
? $rbacsystem
42
: $DIC->rbac()->system();
43
$this->ref_id =
$ref_id
;
44
$this->user_id =
$user_id
;
45
}
46
47
public
function
enableWrite
(
bool
$write): void
48
{
49
$this->enable_write = $write;
50
}
51
52
public
function
checkWrite
(): bool
53
{
54
$rbacsystem =
$this->rbacsystem
;
55
if
($this->ref_id == 0) {
56
return
true
;
57
}
58
59
return
($this->enable_write ||
60
$rbacsystem->
checkAccessOfUser
(
61
$this->user_id,
62
"write"
,
63
$this->ref_id
64
) ||
65
$rbacsystem->
checkAccessOfUser
(
66
$this->user_id,
67
"sty_write_content"
,
68
$this->ref_id
69
)
70
);
71
}
72
}
ILIAS\Style\Content\Access\StyleAccessManager\$user_id
int $user_id
Definition:
class.StyleAccessManager.php:33
ILIAS\Style\Content\Access\StyleAccessManager\checkWrite
checkWrite()
Definition:
class.StyleAccessManager.php:52
ILIAS\Style\Content\Access
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.StyleAccessManager.php:21
ilRbacSystem\checkAccessOfUser
checkAccessOfUser(int $a_user_id, string $a_operations, int $a_ref_id, string $a_type="")
Definition:
class.ilRbacSystem.php:113
ilRbacSystem
$DIC
global $DIC
Definition:
feed.php:28
ILIAS\Style\Content\Access\StyleAccessManager\enableWrite
enableWrite(bool $write)
Definition:
class.StyleAccessManager.php:47
ILIAS\Style\Content\Access\StyleAccessManager\$rbacsystem
ilRbacSystem $rbacsystem
Definition:
class.StyleAccessManager.php:34
ILIAS\Style\Content\Access\StyleAccessManager\$ref_id
int $ref_id
Definition:
class.StyleAccessManager.php:32
ILIAS\Style\Content\Access\StyleAccessManager\$enable_write
bool $enable_write
Definition:
class.StyleAccessManager.php:31
ILIAS\Style\Content\Access\StyleAccessManager\__construct
__construct(ilRbacSystem $rbacsystem=null, int $ref_id=0, int $user_id=0)
Definition:
class.StyleAccessManager.php:36
ILIAS\Style\Content\Access\StyleAccessManager
Manages access to content style editing.
Definition:
class.StyleAccessManager.php:29
Services
Style
Content
Access
class.StyleAccessManager.php
Generated on Fri Apr 4 2025 22:03:00 for ILIAS by
1.8.13 (using
Doxyfile
)