Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing route #16

Closed
thomasgatt opened this issue Aug 30, 2017 · 2 comments
Closed

Missing route #16

thomasgatt opened this issue Aug 30, 2017 · 2 comments

Comments

@thomasgatt
Copy link

thomasgatt commented Aug 30, 2017

Thank you for your work.

I downloaded your plugin via composer and installed it completely. I've loaded the plugin with routes => true and managed to load 'database-log/logs'. However when I try to access 'Details' or 'Delete' I get the following:

Error: A route matching "array ( 'controller' => 'Users', 'action' => 'login', 'plugin' => NULL, 'prefix' => 'admin', '_ext' => NULL, )" could not be found.

I get the above when I try to access: admin/database-log/logs/view/37

Seems to be an issue with Auth. I managed to solve it by adding the following in the LogsController of your plugin;
public function beforeFilter(Event $event) {
if ($this->Auth->User('role_id') == 1)
$this->Auth->allow(['logs', 'index', 'view', 'delete']);
}

However I'm not sure if this is the right way to handle it.

Running cakephp v 3.3.16

@dereuromark
Copy link
Owner

It is an Auth issue, you are not properly setting your auth login url :) Resetting prefix and plugin parts.

@thomasgatt
Copy link
Author

I managed to sort that, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants