Hello

I am implementing ACL+Auth in my app and seem to have come across a
restricted controller name.  One of my controllers was named 'Tests'.
I setup the permissions so that all the methods/views for 'Tests' are
off limits without first logging-in.  For some reason I couldn't get
the Auth component to redirect me to the login page while accessing
the views associated with this controller.  After looking in the core
I found this:

(In CakePHP 1.2 in 'cake/libs/controller/components/auth.php', around
line 265:)

   if (strtolower($controller->name) == 'app' ||
(strtolower($controller->name) == 'tests' && Configure::read() > 0)) {
      return;
   }

In this if-statement I changed 'tests' to something else ('ctests'),
and my ACL+Auth setup worked properly.  Since then, I have gone back
and changed my controller name to something other than 'Tests', and
removed my mod. to auth.php.

This leaves me curious - has anyone else come across any other
restricted controller names?  I've done a quick google search, but did
not find anything.  Not using a controller named 'Tests' seems
important enough to be documented somewhere - we can flatten the
learning curve a bit...

Any thoughts?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to