-- Ralf Eggert <[email protected]> wrote
(on Friday, 01 October 2010, 02:11 PM +0200):
> I want to combine an ACL with Zend_Acl with the output of a Zend_View
> script. Here is the scenario:
> 
> I have a couple of user groups, for example admin and employer. Then I
> have some admind and employers A, B and C. The admins and employers
> should be able to show a job application. But depending on user group
> and the user itself, all these guys should have different access to a
> job application view.
> 
> - Admins should be able to see all detailed data of the job application
> - Employer A is a normal employer with no special user based
>   limitations. He should see everything except an internal memo
>   field.
> - Employer B should see everything that employer A can see, without
>   the ranking and a special status field.
> - Employer C should see everything that employer A can see, without
>   the email communication for this application and a special status
>   field.
> 
> The question is not how to build the ACL for this scenario. The question
> is how to handle this in the view scripts.

I wouldn't handle it at the view level. I'd instead have the controller
select a different view based on the current role. 

For re-usable portions of the view, you can use partials within the
individual views.

-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

Reply via email to