# ACL command cake migrations migrate -p Acl gives the error

**URL:** <https://discourse.cakephp.org/t/acl-command-cake-migrations-migrate-p-acl-gives-the-error/9536>\
**Category:** Uncategorized\
**Created:** [July 19, 2021, 12:33pm UTC](https://discourse.cakephp.org/t/acl-command-cake-migrations-migrate-p-acl-gives-the-error/9536 "2021-07-19T12:33:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zohaib.yunis](https://avatars.discourse-cdn.com/v4/letter/z/74df32/32.png) [@zohaib.yunis](https://discourse.cakephp.org/u/zohaib.yunis)\
**Post date:** [July 19, 2021, 12:33pm UTC](https://discourse.cakephp.org/t/acl-command-cake-migrations-migrate-p-acl-gives-the-error/9536/1 "2021-07-19T12:33:47Z")

</div>

Return value of Acl\Model\Table\AclNodesTable::defaultConnectionName() must be of the type string, null returned  
In [E:\xampp\htdocs\site\vendor\cakephp\acl\src\Model\Table\AclNodesTable.php, line 43]

using windows xampp and cakephp4.2.6 strawberry

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [July 19, 2021, 1:09pm UTC](https://discourse.cakephp.org/t/acl-command-cake-migrations-migrate-p-acl-gives-the-error/9536/2 "2021-07-19T13:09:00Z")

</div>

Have you checked that particular line of code? Looks like it’s probably `return Configure::read('Acl.database');`? Have you actually set up that configuration?

---

<div class="post-metadata">

**Author:** ![zohaib.yunis](https://avatars.discourse-cdn.com/v4/letter/z/74df32/32.png) [@zohaib.yunis](https://discourse.cakephp.org/u/zohaib.yunis)\
**Post date:** [July 19, 2021, 7:28pm UTC](https://discourse.cakephp.org/t/acl-command-cake-migrations-migrate-p-acl-gives-the-error/9536/3 "2021-07-19T19:28:09Z")

</div>

Thanks, actually cache wasn’t cleared

---

<div class="post-metadata">

**Author:** ![lish](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@lish](https://discourse.cakephp.org/u/lish)\
**Post date:** [July 26, 2023, 12:54pm UTC](https://discourse.cakephp.org/t/acl-command-cake-migrations-migrate-p-acl-gives-the-error/9536/4 "2023-07-26T12:54:14Z")

</div>

can you please tell me how do you implement all this code with example @zohaib.yunis actually i am using cakephp 4.4.15 latest released version and there is no helping support for role based access and permission please help me if you already done this all

---

<div class="post-metadata">

**Author:** ![zohaib.yunis](https://avatars.discourse-cdn.com/v4/letter/z/74df32/32.png) [@zohaib.yunis](https://discourse.cakephp.org/u/zohaib.yunis)\
**Post date:** [July 26, 2023, 5:58pm UTC](https://discourse.cakephp.org/t/acl-command-cake-migrations-migrate-p-acl-gives-the-error/9536/5 "2023-07-26T17:58:24Z")

</div>

@lish apology i don’t have the code, i build it for someone at that time, this repo will help a lot in implementation of ACL [GitHub - cakephp/acl: Plugin for managing ACL in CakePHP applications.](https://github.com/cakephp/acl)

---

<div class="post-metadata">

**Author:** ![lish](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@lish](https://discourse.cakephp.org/u/lish)\
**Post date:** [July 27, 2023, 4:50am UTC](https://discourse.cakephp.org/t/acl-command-cake-migrations-migrate-p-acl-gives-the-error/9536/6 "2023-07-27T04:50:20Z")

</div>

thanks for reply @zohaib.yunis but its really hard to understand how to implement this code stuff. you please tell me this package with Authentication or Authorization plugin, because My existing code I am using these plugin for login logout and registering user. Cakephp official documentation told about Policies but there are also some confusion how to set dynamic permissions and role. if you have any about it then tell me.  
Watched youtube tutorial but that was Laravel which provide simple plugin so I just got idea from that but hard to implement in cakephp
