aboutsummaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorMoritz Strohm <strohm@data-quest.de>2025-11-03 10:22:30 +0000
committerMoritz Strohm <strohm@data-quest.de>2025-11-03 10:22:30 +0000
commit599d79f0424dcf66b95a54ae958191037b60ffdb (patch)
tree057fba47dfc920beff454c6ad8b72f72961332c7 /app/controllers
parent41674dbcba78e9f6c505c0ff37fb5fcafcee9073 (diff)
Revert "group calendar: show the calendar items of the current user, too, fixes #5695"
Closes #5695 Merge request studip/studip!4582
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/calendar/calendar.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/controllers/calendar/calendar.php b/app/controllers/calendar/calendar.php
index 70c1935..6e79d3a 100644
--- a/app/controllers/calendar/calendar.php
+++ b/app/controllers/calendar/calendar.php
@@ -643,15 +643,11 @@ class Calendar_CalendarController extends AuthenticatedController
$group = null;
$users = [];
if ($group_id) {
- $current_user = User::findCurrent();
//Get the group first:
$group = ContactGroup::find($group_id);
- if ($group->owner_id !== $current_user->id) {
+ if ($group->owner_id !== User::findCurrent()->id) {
throw new AccessDeniedException();
}
- //Add the current user to the list of users so that they can see
- //their own calendar in the group calendar, too:
- $users[] = $current_user;
foreach ($group->items as $item) {
if ($item->user->isCalendarReadable()) {
$users[] = $item->user;