Fix admins could not delete other user's shares

This commit is contained in:
nathan 2023-08-23 11:35:00 -06:00
parent b8b730b0cd
commit 7370cfe0ee

View File

@ -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'];