Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-19-2007, 12:52 PM
Dead_Thinker's Avatar
Junior Member
 
Join Date: May 2007
Location: Fortaleza/Ceará/Brazil
Posts: 22
Send a message via ICQ to Dead_Thinker Send a message via Yahoo to Dead_Thinker Send a message via Skype™ to Dead_Thinker
Question Zend_Acl, controllers, actions and HTML Blocks

Hi guys, i've made a quite nice access control with Zend_Acl, but i did't know how to control the view of some HTML blocks, like, user 1 can see all tabs of a page, user 2 can see just tab 1 and 2.

Can u give some idea of how can i do that?

Thanx.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-20-2007, 11:52 PM
SpotSec's Avatar
Senior Member
 
Join Date: Feb 2007
Location: United States
Posts: 121
Default

Check their permissions using $acl->isAllowed()
__________________
Zym Framework - A Zend Framework extension library w/ demo app

SpotSec Blog:
http://spotsec.com/blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-23-2007, 11:38 AM
Dead_Thinker's Avatar
Junior Member
 
Join Date: May 2007
Location: Fortaleza/Ceará/Brazil
Posts: 22
Send a message via ICQ to Dead_Thinker Send a message via Yahoo to Dead_Thinker Send a message via Skype™ to Dead_Thinker
Default

I know that, already using it on the page/action permissions, but i mean, how i'll controll the show/hide of HTML blocks of a use, on a "pretty" way? Like a template systems...

I'm trying to avoid to put the "hardcoded" permission direct on the View layer.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-31-2007, 06:02 AM
Member
 
Join Date: Jun 2007
Posts: 33
Default

Maybe you could put the tabs into an array, and in the controller determine what goes into the array. Then your view loops through the array.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:34 PM.