{"action":"created","issue":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/11590","repository_url":"https://api.github.com/repos/phalcon/cphalcon","labels_url":"https://api.github.com/repos/phalcon/cphalcon/issues/11590/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/issues/11590/comments","events_url":"https://api.github.com/repos/phalcon/cphalcon/issues/11590/events","html_url":"https://github.com/phalcon/cphalcon/pull/11590","id":143333053,"number":11590,"title":"Firewall component, afterBinding in dispatcher","user":{"login":"Jurigag","id":10086991,"avatar_url":"https://avatars.githubusercontent.com/u/10086991?v=3","gravatar_id":"","url":"https://api.github.com/users/Jurigag","html_url":"https://github.com/Jurigag","followers_url":"https://api.github.com/users/Jurigag/followers","following_url":"https://api.github.com/users/Jurigag/following{/other_user}","gists_url":"https://api.github.com/users/Jurigag/gists{/gist_id}","starred_url":"https://api.github.com/users/Jurigag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jurigag/subscriptions","organizations_url":"https://api.github.com/users/Jurigag/orgs","repos_url":"https://api.github.com/users/Jurigag/repos","events_url":"https://api.github.com/users/Jurigag/events{/privacy}","received_events_url":"https://api.github.com/users/Jurigag/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phalcon/cphalcon/labels/New%20Feature%20Request","name":"New Feature Request","color":"0052cc"},{"url":"https://api.github.com/repos/phalcon/cphalcon/labels/Requires-Discussion","name":"Requires-Discussion","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2016-03-24T19:07:03Z","updated_at":"2016-04-26T14:13:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/phalcon/cphalcon/pulls/11590","html_url":"https://github.com/phalcon/cphalcon/pull/11590","diff_url":"https://github.com/phalcon/cphalcon/pull/11590.diff","patch_url":"https://github.com/phalcon/cphalcon/pull/11590.patch"},"body":"@sergeyklay @daison12006013 @valVk @SidRoberts\r\n\r\nTODO, Requires discussion:\r\n- [ ] - After binding tests\r\n- [ ] - Discussion about ```Phalcon\\Firewall\\Adapter::setRoleCallback()``` - maybe diffrent name, maybe we could pass $di as parameter which will be get from dispatcher instead of writing use ($di), don't know if there is any performance difference ?\r\n- [ ] - ```Phalcon\\Firewall\\Adapter\\Acl``` - what if we have controllers with same names(multi-module application i guess), maybe some convenient, standardized way of naming in acl service when we have multi-module application ? Like Module:Controller as resource name perhaps ?\r\n- [ ] - Check tests and classes, especially tests of ```Phalcon\\Firewall\\Adapter\\Annotations``` - not sure if the current logic is fine(especially when we provide user roles as array and we have multiple roles in `@Deny` or `@Allow` and also if logic with controller/method checking is fine, for me it's obvious when i put `@Allow` before controller it means for me that i have access to whole controller\r\n- [ ] - Maybe whole Firewall namespace should be put into Phalcon\\Mvc\\Dispatcher, beacause it depends from this dispatcher ?\r\n- [ ] - Methods in firewall to access current controller/action/user/role - for handling exception.\r\n\r\nIn future(or now) - implement firewall adapter on adding routes - not sure if we should add event manager to router, or just internally in router there should be calls into our firewall."},"comment":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/comments/214758767","html_url":"https://github.com/phalcon/cphalcon/pull/11590#issuecomment-214758767","issue_url":"https://api.github.com/repos/phalcon/cphalcon/issues/11590","id":214758767,"user":{"login":"Jurigag","id":10086991,"avatar_url":"https://avatars.githubusercontent.com/u/10086991?v=3","gravatar_id":"","url":"https://api.github.com/users/Jurigag","html_url":"https://github.com/Jurigag","followers_url":"https://api.github.com/users/Jurigag/followers","following_url":"https://api.github.com/users/Jurigag/following{/other_user}","gists_url":"https://api.github.com/users/Jurigag/gists{/gist_id}","starred_url":"https://api.github.com/users/Jurigag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jurigag/subscriptions","organizations_url":"https://api.github.com/users/Jurigag/orgs","repos_url":"https://api.github.com/users/Jurigag/repos","events_url":"https://api.github.com/users/Jurigag/events{/privacy}","received_events_url":"https://api.github.com/users/Jurigag/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T14:13:16Z","updated_at":"2016-04-26T14:13:16Z","body":"Yes, 300 mb is debug one. Phalcon 2.1.x is 4.6 mb."}}