Sunday, February 13, 2022

[FIXED] CakePHP 3.0 Role Based Access Control

Issue

I am having a hard time finding assistance on securing my application. I want to create a role based system, in CakePHP, that would allow me to assign users to a role(s), assign permissions to a role, and use the roles to control who can see/do what on my application. I recall there being something you could use in CakePHP 2.X but I can't find anything in 3.0. Is this still supported? Is there a recommended way to do this? In particular, I need to know the table structure, so I can add them to my database diagram.

thanks


Solution

You may want to use TinyAuth plugin by dereuromark or the official ACL plugin by cakephp.

The ActionsAuthorize & CrudAuthorize adapter available in CakePHP 2.x have now been moved to a separate plugin cakephp/acl.

https://book.cakephp.org/3.0/en/controllers/components/authentication.html#authorization



Answered By - Marijan

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.