◆ __construct()
ilObjEmployeeTalkAccess::__construct |
( |
| ) |
|
◆ _checkGoto()
static ilObjEmployeeTalkAccess::_checkGoto |
( |
|
$target | ) |
|
|
static |
Definition at line 89 of file class.ilObjEmployeeTalkAccess.php.
93 $t_arr = explode(
'_', $target);
94 if ($t_arr[0] !==
'etal' || ((
int) $t_arr[1]) <= 0) {
97 if ($access->canRead(intval($t_arr[1]))) {
◆ _getCommands()
static ilObjEmployeeTalkAccess::_getCommands |
( |
| ) |
|
|
static |
get commands
this method returns an array of all possible commands/permission combinations
example: $commands = array ( array('permission' => 'read', 'cmd' => 'view', 'lang_var' => 'show'), array('permission' => 'write', 'cmd' => 'edit', 'lang_var' => 'edit'), );
Definition at line 70 of file class.ilObjEmployeeTalkAccess.php.
Referenced by ilObjEmployeeTalkListGUI\init().
74 'permission' =>
'read',
75 'cmd' => ControlFlowCommand::DEFAULT,
◆ _isOffline()
static ilObjEmployeeTalkAccess::_isOffline |
( |
|
$obj_id | ) |
|
|
static |
◆ canCreate()
ilObjEmployeeTalkAccess::canCreate |
( |
?ilObjUser |
$talkParticipant = null | ) |
|
Checks if the user is allowed to create a new talks series.
If no user is given only the position right is checked, which can be used to display create or new buttons based on the general position rights of the user.
If the user is given, only positions with an authority over the given user are used to check the position rights.
- Parameters
-
ilObjUser | null | $talkParticipant | The talk participant which should get invited into the new talk. |
- Returns
- bool True if the user has creation rights otherwise false.
Definition at line 115 of file class.ilObjEmployeeTalkAccess.php.
References getCurrentUsersId(), ilOrgUnitPermissionQueries\getTemplateSetForContextName(), null, and ilObjEmployeeTalk\TYPE.
121 if ($currentUserId === 6) {
126 if (!$this->talkPositionSettings->isActive()) {
130 $positions = $this->ua->getPositionsOfUserId($currentUserId);
133 if ($talkParticipant ===
null) {
134 foreach ($positions as $position) {
137 $isAbleToExecuteOperation = array_reduce($permissionSet->getOperations(),
function (
bool $prev,
ilOrgUnitOperation $it) {
138 return $prev || $it->getOperationString() === EmployeeTalkPositionAccessLevel::CREATE;
142 if (!$isAbleToExecuteOperation) {
154 return $this->hasAuthorityAndOperationPermissionOverUser($talkParticipant, EmployeeTalkPositionAccessLevel::CREATE);
static getTemplateSetForContextName(string $context_name, string $position_id, bool $editable=false)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ canDelete()
ilObjEmployeeTalkAccess::canDelete |
( |
int |
$refId | ) |
|
◆ canEdit()
ilObjEmployeeTalkAccess::canEdit |
( |
int |
$refId | ) |
|
◆ canEditTalkLockStatus()
ilObjEmployeeTalkAccess::canEditTalkLockStatus |
( |
int |
$refId | ) |
|
◆ canRead()
ilObjEmployeeTalkAccess::canRead |
( |
int |
$refId | ) |
|
◆ getCurrentUsersId()
ilObjEmployeeTalkAccess::getCurrentUsersId |
( |
| ) |
|
|
private |
◆ getInstance()
static ilObjEmployeeTalkAccess::getInstance |
( |
| ) |
|
|
static |
◆ hasPermissionToReadUnownedTalksOfUser()
ilObjEmployeeTalkAccess::hasPermissionToReadUnownedTalksOfUser |
( |
int |
$userId | ) |
|
◆ isPermittedToExecuteOperation()
ilObjEmployeeTalkAccess::isPermittedToExecuteOperation |
( |
int |
$refId, |
|
|
string |
$operation |
|
) |
| |
|
private |
Definition at line 217 of file class.ilObjEmployeeTalkAccess.php.
References $data, and getCurrentUsersId().
Referenced by canEdit(), and canRead().
222 if ($currentUserId === 6) {
227 if (!$this->talkPositionSettings->isActive()) {
232 $series = $talk->getParent();
233 $hasAuthority = $this->hasAuthorityAndOperationPermissionOverUser(
new ilObjUser($talk->getData()->getEmployee()), $operation);
234 $data = $talk->getData();
235 $seriesSettings = $this->seriesSettingsRepository->readEmployeeTalkSerieSettings($series->getId());
236 $canExecuteOperation = $this->orgUnitAccess->checkPositionAccess($operation,
$refId);
237 $isOwner = $talk->getOwner() === $currentUserId;
243 if ($currentUserId ===
$data->getEmployee()) {
245 if ($operation !== EmployeeTalkPositionAccessLevel::VIEW) {
254 if ($seriesSettings->isLockedEditing() && $operation === EmployeeTalkPositionAccessLevel::EDIT) {
259 if (!$hasAuthority) {
264 if ($canExecuteOperation) {
◆ isTalkReadonlyByCurrentUser()
ilObjEmployeeTalkAccess::isTalkReadonlyByCurrentUser |
( |
int |
$ref_id | ) |
|
◆ $container
Container ilObjEmployeeTalkAccess::$container |
|
private |
◆ $instance
self ilObjEmployeeTalkAccess::$instance = null |
|
staticprivate |
◆ $orgUnitAccess
IlOrgUnitPositionAccess ilObjEmployeeTalkAccess::$orgUnitAccess |
|
private |
◆ $seriesSettingsRepository
◆ $set
◆ $talkPositionSettings
◆ $ua
The documentation for this class was generated from the following file: