aboutsummaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorArne Schröder, M. A. <schroeder@data-quest.de>2026-02-18 11:26:21 +0000
committerRasmus Fuhse <fuhse@data-quest.de>2026-02-18 11:26:21 +0000
commit93ab04fdc51ae681ff2d4ec9774d2b44244ea2f2 (patch)
tree1ae8fe74690ca02db422001280791e0d38726037 /app/controllers
parentf87679a9d8ef2ea25526897da8aa761287cacabc (diff)
Resolve "ILIAS-Schnittstelle: Anzeige von Arbeitsbereichen in Navigation und Arbeitsplatz auch unterhalb von tutor"
Closes #6272 Merge request studip/studip!4742
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/my_ilias_accounts.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/my_ilias_accounts.php b/app/controllers/my_ilias_accounts.php
index bbb7ecf..ad22248 100644
--- a/app/controllers/my_ilias_accounts.php
+++ b/app/controllers/my_ilias_accounts.php
@@ -234,7 +234,7 @@ class MyIliasAccountsController extends AuthenticatedController
}
/**
- * Shows ilias courses for active user
+ * Shows ilias courses and workgroups for active user
*/
public function my_courses_action()
{
@@ -286,7 +286,7 @@ class MyIliasAccountsController extends AuthenticatedController
$widget = new ActionsWidget();
foreach ($this->ilias_list as $ilias_list_index => $ilias) {
- if ($GLOBALS['perm']->have_perm('autor')) {
+ if (User::findCurrent()->hasPermissionLevel('autor')) {
$widget->addLink(
sprintf(_('Zur %s-Startseite'), $ilias->getName()),
$this->url_for('my_ilias_accounts/redirect/' . $ilias_list_index . '/login'),
@@ -337,7 +337,7 @@ class MyIliasAccountsController extends AuthenticatedController
}
}
- if ($ilias->ilias_config['workgroup_category']) {
+ if ($ilias->ilias_config['workgroup_category'] && User::findCurrent()->hasPermissionLevel('tutor')) {
// Prepare search object for MultiPersonSearch.
if (empty($this->add_member_search)) {
$this->add_member_search = new PermissionSearch(
@@ -351,13 +351,13 @@ class MyIliasAccountsController extends AuthenticatedController
);
}
- $this->workgroups_list[$ilias_list_index] = $ilias->getUserWorkgroups($GLOBALS['perm']->have_perm('root'));
+ $this->workgroups_list[$ilias_list_index] = $ilias->getUserWorkgroups(User::findCurrent()->hasPermissionLevel('root'));
$this->add_workgroups_perm[$ilias_list_index] =
!empty($ilias->ilias_config['workgroup_category'])
&& !empty($ilias->ilias_config['workgroup_role'])
&& !empty($ilias->ilias_config['workgroup_perm'])
- && $GLOBALS['perm']->have_perm($ilias->ilias_config['workgroup_perm']);
+ && User::findCurrent()->hasPermissionLevel($ilias->ilias_config['workgroup_perm']);
}
}
}