From 28aaf8e28feb29b8788e5b49939ac36b23749486 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 21 Mar 2024 08:23:08 +0100 Subject: [PATCH] users will see only their own notifications --- views/bootstrap/class.DocumentNotify.php | 20 ++++++++++---------- views/bootstrap/class.FolderNotify.php | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/views/bootstrap/class.DocumentNotify.php b/views/bootstrap/class.DocumentNotify.php index a6463abcf..2404ec5e6 100644 --- a/views/bootstrap/class.DocumentNotify.php +++ b/views/bootstrap/class.DocumentNotify.php @@ -151,10 +151,10 @@ $(document).ready( function() { } else { print "\n"; foreach ($notifyList["users"] as $userNotify) { - print ""; - print ""; - print ""; if ($user->isAdmin() || $user->getID() == $userNotify->getID()) { + print ""; + print ""; + print ""; print "\n"; echo createHiddenFieldWithKey('documentnotify')."\n"; print "getID()."\">\n"; @@ -164,14 +164,14 @@ $(document).ready( function() { print ""; print ""; print "\n"; - }else print ""; - print ""; + print ""; + } } foreach ($notifyList["groups"] as $groupNotify) { - print ""; - print ""; - print ""; if ($user->isAdmin() || $groupNotify->isMember($user,true)) { + print ""; + print ""; + print ""; print "\n"; echo createHiddenFieldWithKey('documentnotify')."\n"; print "getID()."\">\n"; @@ -181,8 +181,8 @@ $(document).ready( function() { print ""; print ""; print "\n"; - }else print ""; - print ""; + print ""; + } } print "
" . htmlspecialchars($userNotify->getLogin() . " - " . $userNotify->getFullName()) . "
" . htmlspecialchars($userNotify->getLogin() . " - " . $userNotify->getFullName()) . "
" . htmlspecialchars($groupNotify->getName()) . "
" . htmlspecialchars($groupNotify->getName()) . "
\n"; } diff --git a/views/bootstrap/class.FolderNotify.php b/views/bootstrap/class.FolderNotify.php index 56a7a5961..ada8b3d4e 100644 --- a/views/bootstrap/class.FolderNotify.php +++ b/views/bootstrap/class.FolderNotify.php @@ -151,10 +151,10 @@ $(document).ready(function() { } else { print "\n"; foreach ($notifyList["users"] as $userNotify) { - print ""; - print ""; - print ""; if ($user->isAdmin() || $user->getID() == $userNotify->getID()) { + print ""; + print ""; + print ""; print "\n"; echo createHiddenFieldWithKey('foldernotify')."\n"; print "getID()."\">\n"; @@ -164,14 +164,14 @@ $(document).ready(function() { print ""; print ""; print "\n"; - }else print ""; - print ""; + print ""; + } } foreach ($notifyList["groups"] as $groupNotify) { - print ""; - print ""; - print ""; if ($user->isAdmin() || $groupNotify->isMember($user,true)) { + print ""; + print ""; + print ""; print "\n"; echo createHiddenFieldWithKey('foldernotify')."\n"; print "getID()."\">\n"; @@ -181,8 +181,8 @@ $(document).ready(function() { print ""; print ""; print "\n"; - }else print ""; - print ""; + print ""; + } } print "
" . htmlspecialchars($userNotify->getLogin() . " - " . $userNotify->getFullName()) . "
" . htmlspecialchars($userNotify->getLogin() . " - " . $userNotify->getFullName()) . "
" . htmlspecialchars($groupNotify->getName()) . "
" . htmlspecialchars($groupNotify->getName()) . "
\n"; }