i am creating a acl controller plugin that checks the if the user is authorized to the resource and redirect to the error controller to handle it. how do i go abt doing this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Take a look at this question on SO: Help with Zend ACL.
Another good ACL/Auth tutorial can by found at devzone: Zend_Acl / Zend_Auth Example Scenario (The codelisting is incomplete but have a look at the comment “THE MISSING PIECES”)
The important part is in the preDispatch Plugin:
If the is not logged in or has insufficient rights the request will be modified to forward to the Loginpage or the error controller.