From 5fa7759e40b19f2979a1db63657b6c3133ceb6ee Mon Sep 17 00:00:00 2001 From: iglocska Date: Fri, 10 Jan 2014 15:11:33 +0100 Subject: [PATCH] File left off from previous commit --- app/View/Events/view.ctp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/View/Events/view.ctp b/app/View/Events/view.ctp index b81d3a141..d310480a4 100755 --- a/app/View/Events/view.ctp +++ b/app/View/Events/view.ctp @@ -307,10 +307,12 @@ if (!empty($event['Attribute'])):?> Html->link('', array('controller' => 'shadow_attributes', 'action' => 'accept', $shadowAttribute['id']), array('class' => 'icon-ok', 'title' => 'Accept')); } - echo $this->Form->postLink('', array('controller' => 'shadow_attributes', 'action' => 'discard', $shadowAttribute['id']), array('class' => 'icon-trash', 'title' => 'Discard'), 'Are you sure you want to discard this proposal?'); + if (($event['Event']['orgc'] == $me['org'] && $mayModify) || $isSiteAdmin || ($shadowAttribute['org'] == $me['org'])) { + echo $this->Form->postLink('', array('controller' => 'shadow_attributes', 'action' => 'discard', $shadowAttribute['id']), array('class' => 'icon-trash', 'title' => 'Discard'), 'Are you sure you want to discard this proposal?'); + } ?> @@ -384,10 +386,12 @@ if (!empty($event['Attribute'])):?> Html->link('', array('controller' => 'shadow_attributes', 'action' => 'accept', $remain['id']), array('class' => 'icon-ok', 'title' => 'Accept')); } - echo $this->Form->postLink('', array('controller' => 'shadow_attributes', 'action' => 'discard', $remain['id']), array('class' => 'icon-trash', 'title' => 'Discard'), 'Are you sure you want to discard this proposal?'); + if (($event['Event']['orgc'] == $me['org'] && $mayModify) || $isSiteAdmin || ($remain['org'] == $me['org'])) { + echo $this->Form->postLink('', array('controller' => 'shadow_attributes', 'action' => 'discard', $remain['id']), array('class' => 'icon-trash', 'title' => 'Discard'), 'Are you sure you want to discard this proposal?'); + } ?>