tags:

views:

21

answers:

1

I know how to use Zend_Acl to allow certain resources to certain usergroups but how do i use it to allow only specific parts of the page to be shown? For example

I have a button to delete a post via AJAX on the page but i only want to show the button to Admins only. I can use Zend_Acl to block access to the controller post/delete but i can't use it to block the button from showing.

+2  A: 
// in controller
$this->view->allow_delete_post = $acl->isAllowed($role, 'delete_post');

.

// in template
<? if ($this->allow_delete_post): ?>[button html]<? endif; ?>

Would that not do it?

Derek Illchuk
Thank you my good sir.
Brandon_R