CakePHP ACL and Auth not working

I have some questions about CakePHPs ACL and Auth system.

  • What is the alias naming convention in acos table? Is it "controllers / messages / add" or is it just "add" with the parent identifier from the "Messages"?
  • My login does not work. When I try to log in, I do not receive an error message, but Auth.User and Auth-> user ('id') are empty. What could be the problem? I do everything as in the CakePHP ACL example.

Thank.

UPDATE: Now my login is working (a problem with the time settings on the server), and my acos table looks right, but I can’t proceed to any action. I enabled the action in the aros_acos table. If I check the permission with "$ this-> Acl-> check ()", it just works if I give one action name and not the full path ("controllers / Posts / add" does not work).

+5
source share
2 answers

I solved the problems:

  • Verify that the time on the server is correct. Otherwise, the sessions will not work.
  • Correct the table data in the acos table. Especially make sure that the values ​​of "lft" and "rght" are correct. This page may help: http://www.sitepoint.com/hierarchical-data-database-2/
  • , acos. , . .
+1
0

All Articles