From af3e4601fcbca62e681a97f8a3c7a60ce9b0b8a7 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 14 May 2005 20:52:16 +0000 Subject: [PATCH] r132: - $show['getattachments'] and $show['putattachments'] will also be set true if the user has CANEDITATTACH flags - $show['editattach'] requires either CANEDITATTACH or (CANPUTATTACH and having ownership of the attachment) flags to be set true --- showreport.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/showreport.php b/showreport.php index 3969b5a..5a9a4ea 100644 --- a/showreport.php +++ b/showreport.php @@ -79,8 +79,8 @@ foreach ($words AS $word) // ------------------------------------------------------------------- // attachments -$show['getattachments'] = ((can_perform('cangetattach')) ? true : false); -$show['putattachments'] = ((can_perform('canputattach')) ? true : false); +$show['getattachments'] = ((can_perform('cangetattach') OR can_perform('caneditattach')) ? true : false); +$show['putattachments'] = ((can_perform('canputattach') OR can_perform('caneditattach')) ? true : false); if ($show['getattachments'] OR $show['putattachments']) { @@ -95,7 +95,7 @@ if ($show['getattachments'] OR $show['putattachments']) ); while ($attachment = $db->fetch_array($attachments_fetch)) { - $show['editattach'] = ((can_perform('caneditattach') OR $attachment['userid'] == $bugsys->userinfo['userid']) ? true : false); + $show['editattach'] = ((can_perform('caneditattach') OR ($attachment['userid'] == $bugsys->userinfo['userid'] AND can_perform('canputattach'))) ? true : false); $attachment['date'] = datelike('standard', $attachment['dateline']); $attachment['user'] = construct_user_display($attachment, false); eval('$attachments .= "' . $template->fetch('showreport_attachment') . '";'); -- 2.22.5