0
votes

I'm trying to set up CakePHP's acl feature, for a bit of experimentation. The documentation says I can do:

Console\cake acl initdb

http://book.cakephp.org/2.0/en/console-and-shells/acl-shell.html

Or perhaps:

cake schema create DbAcl

http://book.cakephp.org/2.0/en/core-libraries/components/access-control-lists.html#defining-permissions-cakephp-s-database-acl

However they return the same error:

The chosen schema could not be loaded. Attempted to load:
File: C:\wamp\www\cakeuser\app\Config\Schema\schema.php
Name: DbAcl

I ran these commands from the /app folder.

What am I doing wrong?

3
Q: "What am I doing wrong?" A: using ACL in the first place (IMO of course) - Dave
Oh ok... tbh i'm just checking out various frameworks and getting to grips with the features they offer - Harry
ACL might have it's uses, but is overly-complicated IMO. Unless you need every feature it offers and EXACTLY those, there are much easier ways to go. CakePHP is amazing, and I back it 100%, but - passing along the knowledge I received when trying to use it myself "Unless you KNOW you NEED ACL, then you don't need ACL." (I realize this doesn't answer your question though) - Dave
Fair play then. I quite like cakephp so far so will check out some other areas instead. I was looking at ACL because of this plugin milesj.me/code/cakephp/admin - Harry
@Dave I agree it is over-complicated. I've also used Croogo the cake cms, it made my app very slow. Do you have any alternate solution to implement Access Control layer in cake app ? - Moyed Ansari

3 Answers

1
votes

Alternatively, you can manually run the db_acl.sql in mysql file located in app/Config/Schema/.

1
votes

For me work execute the code linke this: c:\wamp\www\cake\app>cake schema create dbAcl instead of this c:\wamp\www\cake\app>cake schema create DbAcl

look the dbAcl in my case must to be in lowercase.

0
votes

you should run cake schema create DbAcl from the app path not from the console folder.