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

Extend AclExtras sync in a plugin #93

Open
Wouter0100 opened this issue Nov 4, 2015 · 2 comments
Open

Extend AclExtras sync in a plugin #93

Wouter0100 opened this issue Nov 4, 2015 · 2 comments

Comments

@Wouter0100
Copy link
Contributor

I'm implementing CakePHP/Acl with the FriendsOfCake/Crud plugin, and after sync'ing all acos, none of the Crud actions appeard in the Acos table. This is because these actions aren't really methods, which isn't detected by AclExtras.

I think it would be a good idea to make it possible for plugins to extend or receive an event to add/manipulete there own actions/methods on a sync. Any ideas/comments?

@dakota
Copy link
Member

dakota commented Nov 4, 2015

I've gotten around this by adding:

public function add()
{
    return $this->Crud->execute();
}

to my Crud controllers. I do agree, that the ability for plugins to inject their own actions would be fantastic.

@Wouter0100
Copy link
Contributor Author

Ah, indeed. That's a workaround, I added these 4 methods to my AppController just for creating them. Now they are added to my Acos table, thanks 😄.

I've also experienced some issues with (custom) Traits methods, which are synced. This could also be fixed with a fix for this issue.

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

No branches or pull requests

2 participants