Wednesday, July 2, 2014

Re: CakePHP with UserMgmt Plugin

I put the code here:
https://gist.github.com/SirPilgrims

Il giorno mercoledì 2 luglio 2014 13:13:23 UTC+2, Alessandro Pellegrini ha scritto:

In CakePHP I have this configuration:

//Config/routes.php  Router::connect('/viewServices', array('plugin' => 'usermgmt', 'controller' => 'services', 'action' => 'viewServices'));    //View/Users/dashboard.ctp  <?php echo $this->Html->link(__("Services",true),"/viewServices")?>    //View/Services/view_services.ctp  //I put here the view..    //Controller/ServicesController.php  public function viewServices(){  ....  }

Now I can't understand the reason why it doesn't works!

I can't see the "view_services.ctp". The server redirects me to the "access_denied.ctp" page, but in the "view_services.ctp" I didn't put any control about the authentication, so maybe I'm doing other errors.
 I have a really similar function that works using manageServices instead of viewServices, manage_services.ctp instead of view_services.ctp with the correct line in the routes.php..
I Only add in manage_services.ctp this code:
<?php if ($this->UserAuth->getGroupName()=='Admin') { ?>

And it works! I'm going crazy!


Can somebody helps me?

Thanks!

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: