Mass-accepting proposals did not work, fixes #959

- fixed a legacy style org lookup
pull/976/head
Iglocska 2016-02-21 23:29:01 +01:00
parent 8c7e96a369
commit aa9c3d9fe6
2 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
{"major":2, "minor":4, "hotfix":21}
{"major":2, "minor":4, "hotfix":22}

View File

@ -1060,7 +1060,7 @@ class ShadowAttributesController extends AppController {
$event = $this->ShadowAttribute->Event->find('first', array(
'conditions' => array('id' => $id),
'recursive' => -1,
'fields' => array('id', 'orgc', 'user_id')
'fields' => array('id', 'orgc_id', 'user_id')
));
if ($event['Event']['orgc_id'] != $this->Auth->user('org_id') || (!$this->userRole['perm_modify_org'] && !($this->userRole['perm_modify'] && $event['Event']['user_id'] == $this->Auth->user('id')))) {
return new CakeResponse(array('body'=> json_encode(array('false' => true, 'errors' => 'You don\'t have permission to do that.')),'status'=>200));
@ -1096,7 +1096,7 @@ class ShadowAttributesController extends AppController {
$event = $this->ShadowAttribute->Event->find('first', array(
'conditions' => array('id' => $id),
'recursive' => -1,
'fields' => array('id', 'orgc', 'user_id')
'fields' => array('id', 'orgc_id', 'user_id')
));
if ($event['Event']['orgc_id'] != $this->Auth->user('org_id') || (!$this->userRole['perm_modify_org'] && !($this->userRole['perm_modify'] && $event['Event']['user_id'] == $this->Auth->user('id')))) {
return new CakeResponse(array('body'=> json_encode(array('false' => true, 'errors' => 'You don\'t have permission to do that.')),'status'=>200));