Merge branch 'hotfix-2.2.6'

pull/224/head
iglocska 2014-02-28 12:00:38 +01:00
commit 3b5595ff88
2 changed files with 4 additions and 1 deletions

View File

@ -96,6 +96,9 @@ class AttributesController extends AppController {
* @throws NotFoundException // TODO Exception
*/
public function add($eventId = null) {
if (!$this->userRole['perm_add']) {
throw new MethodNotAllowedException('You don\'t have permissions to create attributes');
}
if ($this->request->is('post')) {
$this->loadModel('Event');
$date = new DateTime();

View File

@ -474,7 +474,7 @@ class EventsController extends AppController {
* @return void
*/
public function add() {
if (!$this->role['perm_add']) {
if (!$this->userRole['perm_add']) {
throw new MethodNotAllowedException('You don\'t have permissions to create events');
}
if ($this->request->is('post')) {