Fix admins could not delete other user's shares

This commit is contained in:
nathan 2023-08-23 11:35:00 -06:00
parent d54eb8e388
commit c50b6e6cae

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