All users have the same rights.
My delete code inside notes_controller.php is:
function delete($id) {
if (!$id) {
$this->Session->setFlash('Invalid id for note', 'flash_error');
$this->redirect(array('action'=>'index'));
}
if ($this->Note->delete($id)) {
$this->Session->setFlash('Your note has been deleted', 'flash_success');
$this->redirect(array('action'=>'index'));
}
$this->Session->setFlash('Oops! Something went wrong. Your note was not
deleted. Try again!', 'flash_error');
$this->redirect(array('action' => 'index'));
}
... this is quite similar to what you gave, isn't it? You can see by
yourself . Login to http://jeeremie.com with *u:* *username* / *p:* *demo123
* and try to delete a note.
<https://lh6.googleusercontent.com/-0Qge2qsusK4/ThBXm51S4zI/AAAAAAAAaI0/uMDDh5_K3TA/delete_function.png>
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php