data)) { $this->Post->data = $this->data; if ($this->Post->validates()) { $this->Post->create(); if($this->Post->save($this->data)) { $acoNode = array('model'=>$this->Post->name, 'foreign_key' =>$this->Post->id); $aroNode = array('model'=>'User', 'foreign_key'=>$this->getUserId()); // User has full control of the post he created $this->Acl->allow($aroNode, $acoNode, '*'); } } } } ?>