From c50b6e6caeb1e9e68383d8155e9fdd4ba34ca56d Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 23 Aug 2023 11:35:00 -0600 Subject: [PATCH] Fix admins could not delete other user's shares --- filemanager/inc/class.filemanager_shares.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/filemanager/inc/class.filemanager_shares.inc.php b/filemanager/inc/class.filemanager_shares.inc.php index f874a7a72d..51c3a622c4 100644 --- a/filemanager/inc/class.filemanager_shares.inc.php +++ b/filemanager/inc/class.filemanager_shares.inc.php @@ -193,7 +193,10 @@ class filemanager_shares extends filemanager_ui switch($content['nm']['action']) { case 'delete': - $where = array('share_owner' => $GLOBALS['egw_info']['user']['account_id']); + if(empty($GLOBALS['egw_info']['user']['apps']['admin'])) + { + $where['share_owner'] = $GLOBALS['egw_info']['user']['account_id']; + } if (!$content['nm']['select_all']) { $where['share_id'] = $content['nm']['selected'];