Implementing Zend_ACL base on database row value

For programming and general questions on Zend Framework

Implementing Zend_ACL base on database row value

Postby jigen7 on Thu Jun 11, 2009 9:40 am

Im just wondering how can you implement zend_acl when you want to lookup the value in tha row database for example i have a table user which has id,username,roles columns, what i want is base on the role given to the user that would be the basis of their zend_acl that can restrict them on some actions to the controller

Example
row 1 , jigen7, admin // can see all the pages
row 2, user, guest // limited to viewing only
jigen7
 
Posts: 14
Joined: Tue Jun 09, 2009 9:23 am

Re: Implementing Zend_ACL base on database row value

Postby dhaval4linux on Fri Jun 12, 2009 8:57 am

you need to save your logged in user to session, when new request come check does session valid,
if its valid then take username from session, Run the query and fetch data.
According to data set you Zend_Acl
This should be done after validating session, so after each process Zend_Acl work as you exptected.
No direct interaction of Zend_Acl with database right now.
Best Regards,
Dhaval
dhaval4linux
 
Posts: 161
Joined: Fri May 22, 2009 2:35 pm


Return to Zend Framework

Who is online

Users browsing this forum: W3C [Validator] and 7 guests