@Amit: requireAuth and requirePost are part of the security component...

@jburns: I have never tried to call a function from app_controller.  You can
try placing a function like this in your controller which you are trying to
delete from.

function delete() {
    parent::delete();
}

On Wed, Nov 18, 2009 at 2:50 PM, Amit <a...@amitvaria.com> wrote:

> I know this sounds basic but it was a mistake I've made before. Make
> sure you got the spelling right and make sure you don't have the
> function defined in another function. I once accidentally wrote my
> isAuthoized() inside of another function (I got lost in curly braces)
> and hit the same issue.
>
> @AD7six - I went through your tutorial and was wondering if the
> SecurityComponent handled protection against CSRF? I'm using
> requireAuth and requirePost to address CSRF.
>
> On Nov 18, 1:11 pm, jburns <jeremybu...@me.com> wrote:
> > Any takers on this please?
> >
> > On Nov 17, 6:25 am, Jeremy Burns <jeremybu...@me.com> wrote:
> >
> >
> >
> > > I am trying to apply this to my site but whenever I access my 'delete'
> action (I have removed references to 'admin_' in the sample code as I am not
> using admin_delete yet) I get the error message "The view for
> XXXController::delete() was not found" (where XXX is my controller). The
> controller doesn't have a 'delete' function in it as I am using the generic
> delete function in the app_controller. What am I doing wrong?
> >
> > > Jeremy Burns
>
> > > On 13 Nov 2009, at 15:44, AD7six wrote:
> >
> > > > On 13 nov, 16:30, jburns <jeremybu...@me.com> wrote:
> > > >> No responses on this - any takers?
> >
> > > > Try this for background:http://www.ad7six.com/e/67
> > > > This (the component is in the mi_plugin branch) for a ~pnp solution,
> > > > but probably a bit too integrated/dependent:
> > > >
> http://code.assembla.com/mi/subversion/nodes/branches/mi_plugin/contr...
> >
> > > > or simply:
> >
> > > > function delete($id) {
> > > > if (!$this->data) {
> > > >  $this->set('referer', $this->referer()); // pick this up in the
> > > > view, and add it to the form
> > > >  return $this->render('/elements/confirm_delete');
> > > > }
> > > > ... actually delete ..
> > > > $this->redirect($this->data[$this->modelAlias]['referer']); // where
> > > > they came from
> > > > }
> >
> > > > hth,
> >
> > > > AD
> >
> > > > --
> >
> > > > You received this message because you are subscribed to the Google
> Groups "CakePHP" group.
> > > > To post to this group, send email to cake-...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>
> .
> > > > For more options, visit this group athttp://
> groups.google.com/group/cake-php?hl=.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-...@googlegroups.com.
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=.


Reply via email to