Help in replacing the acl plugin with authorization plugin with database in cakephp 4.4

How can I replace the acl plugin with the authorization plugin using a database?
I need to give authorization to users in a dynamic way.

You can take a look at how CakeDC has done RBAC inside GitHub - CakeDC/users: Users Plugin for CakePHP or more specifically GitHub - CakeDC/auth: Auth objects for CakePHP

Yes, this is quite the major refactor you will have to do but reason behind this is the fact, that you will have far more granular control over what is happening within your app.

The new auth plugins are “just” the basement of how you want to build your own auth systems. Its NOT a ready made permission system (like CakeDC/Users RBAC) but rather a set of build tools so you can create exactly what you need.