◆ __construct()
ilObjEmployeeTalkAccess::__construct |
( |
| ) |
|
◆ _checkGoto()
static ilObjEmployeeTalkAccess::_checkGoto |
( |
|
$a_target | ) |
|
|
static |
- Parameters
-
string | $a_target | check whether goto script will succeed |
- Returns
- bool
Definition at line 94 of file class.ilObjEmployeeTalkAccess.php.
98 $t_arr = explode(
'_', $a_target);
99 if ($t_arr[0] !==
'etal' || ((
int) $t_arr[1]) <= 0) {
102 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 |
( |
|
$a_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 120 of file class.ilObjEmployeeTalkAccess.php.
References getCurrentUsersId(), ilOrgUnitPermissionQueries\getTemplateSetForContextName(), and ilObjEmployeeTalk\TYPE.
Referenced by ilEmployeeTalkMyStaffListGUI\loadActionBar().
126 if ($currentUserId === 6) {
131 if (!$this->talkPositionSettings->isActive()) {
135 $positions = $this->ua->getPositionsOfUserId($currentUserId);
138 if ($talkParticipant === null) {
139 foreach ($positions as $position) {
142 $isAbleToExecuteOperation = array_reduce($permissionSet->getOperations(),
function (
bool $prev,
ilOrgUnitOperation $it) {
143 return $prev || $it->getOperationString() === EmployeeTalkPositionAccessLevel::CREATE;
147 if (!$isAbleToExecuteOperation) {
159 return $this->hasAuthorityAndOperationPermissionOverUser($talkParticipant, EmployeeTalkPositionAccessLevel::CREATE);
static getTemplateSetForContextName(string $context_name, string $position_id, bool $editable=false)
◆ 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 222 of file class.ilObjEmployeeTalkAccess.php.
References $data, and getCurrentUsersId().
Referenced by canEdit(), and canRead().
227 if ($currentUserId === 6) {
232 if (!$this->talkPositionSettings->isActive()) {
237 $series = $talk->getParent();
238 $hasAuthority = $this->hasAuthorityAndOperationPermissionOverUser(
new ilObjUser($talk->getData()->getEmployee()), $operation);
239 $data = $talk->getData();
240 $seriesSettings = $this->seriesSettingsRepository->readEmployeeTalkSerieSettings($series->getId());
241 $canExecuteOperation = $this->orgUnitAccess->checkPositionAccess($operation,
$refId);
242 $isOwner = $talk->getOwner() === $currentUserId;
248 if ($currentUserId ===
$data->getEmployee()) {
250 if ($operation !== EmployeeTalkPositionAccessLevel::VIEW) {
259 if ($seriesSettings->isLockedEditing() && $operation === EmployeeTalkPositionAccessLevel::EDIT) {
264 if (!$hasAuthority) {
269 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: