You don't understand views, controllers and restrictions. > My /users dir requires login authentication, and that is working OK. But I > assume any sub directory within the /users dir will also be protected, and > maybe this is where the problem is arising?
The root of your mistake - "protected" is NOT users dir but ACTIONS of Users controller you choose to restrict for non-users. If you want to restrict unauthorized access to some ACTION of some CONTROLLER your should protect it by Auth. You have nothing to do with views and any directories here, it is pure controller task. So just move your products views to normal place (views/products) and add Auth component to controller Products with appropriate allow/deny calls in beforeFilter. That's all. And more: > why my view/sub1/sub2/filename.ctp cannot access the controller which is in > my /controllers dir? By default "view/sub1/sub2/filename.ctp" will be rendered on request to controller's "Sub1" action "filename" with request type "sub2". For example, request http://localhost/products/latest.rss will render views/products/rss/latest.ctp On Mar 27, 8:39 am, programguru <ja...@w3developing.com> wrote: > Authentication is for controller, not for view. > > Dr Lobo... > > I would like to agree with you, but logically authentication (username and > password) would be required on a view. > > I think we are using two different definitions of "Authentication". > > I was only referring to a login screen presented for my admin console. > > But I would agree the any Authentication methods would be in the controller. > > -- > View this message in > context:http://n2.nabble.com/controller-not-being-detected-when-view-index-fi... > Sent from the CakePHP mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@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=en -~----------~----~----~----~------~----~------~--~---