Order of plugin controllers matters and is broken
I'm upgrading my app from 1.2 to 1.3. I'm using your acl_extras and everything works great except one weird issue. I'm not sure if this is a bug in Cake or a bug with acl_extras (but I figure you'd be the guy to know).
I have plugin controllers named:
avorders_attributes_contoller.php avorders_categories_controller.php avorders_controller.php avorders_vendors_controller.php
They get input into the DB in the same order as on the file system (which is the order above). The ACL check fails for the first two controllers, but works for the 3rd and 4th. I modifed your code to sort the plugin controller names alphabetically and now ACL works as expected.
On line 190 I added: sort($controllers);
Thanks for this great plugin.
-Kevin
Isn't the filesystem order, which is above, the same as alphapbetical order?
How can the order they are put in the database effect the ACL check???
@markstory: I'm on Windows XP and I think the underscore is basically ignored when alphabetizing the file names. In the Controllers List (where _controller.php is chopped off), now the list isn't in alpha order: AvordersAttributes, AvordersCategories, Avorders isn't in alpha order, but AvordersAttributesController, AvordersCategoriesController, AvordersController is in alpha order (which I guess is the file systems method).
@sitedyno: no clue... it doesn't make sense to me, but that's what was going on in my ACL controlled app (it was the only difference between ACOs that worked and didn't work, which was fixed after sort()ing the Controller List)
Let me know if I can help in any way.
@kwentworth in 1.3 there will be no underscores in plugin or controller node aliases in linux or windows.
I don't have any underscores in my node aliases. All I am trying to say is that controllers aren't always stored in alphabetical order in the file system (due to "_controller.php" being part of the file name). Why this impacts ACL check() is another issue.
@kwentworth the filesystem in Windows is case-INsensitive. maybe this is part of the problem.