Admin section in CakePHP

I find it difficult to understand how the CakePHP administration system works.

  • If all the controllers that have an action requiring a login include AuthComponent or only the one who processes the login / logout?
  • Let's say I want to protect the action of adding a controller. First I create admin_add() in the controller, and then in the beforeFilter() method beforeFilter() check if the $this->Session->check('Auth.User') redirection is set based on this? Turns out it was better to just manage this with $this->Auth->allow()
  • What is the easiest way to get back to the URL that the user was trying to access? Is there a better way than setting a session variable? Turns it off automatically :)

If someone has a good tutorial, I would love to read it :) I already read this tutorial, but I found it a little basic, and CakePHP documents are not that great on this topic.

0
source share
3 answers

There is no such Cake administration system. There is an Authentication component, and there is an Access Control List . You can use only the authentication component if you want, or you can use both of them. If you want to create your own admin system from scratch, follow this tutorial. Or you can try the already created admin panel - the PoundCake control panel .

+3
source

we created an administrative system for cakePHP, we work similarly to forests, but we are configured and ready to deploy, we check it at http://browniephp.org

+1
source

You can learn a lot from other codes, especially something like CakePHP Admin plugin at: https://github.com/Maldicore/Admin

0
source

All Articles