Extend AclExtras sync in a plugin
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?
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.
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 :smile:.
I've also experienced some issues with (custom) Traits methods, which are synced. This could also be fixed with a fix for this issue.