views:

320

answers:

2

I'm looking for a solution in PHP that will allow three types of users to pages that are relevant to them. Not everyone will access all the pages. What do I need - a role-based access control or ACL? Please suggest a good script / tool to address this requirement.

Thank you for your time and attention.

+2  A: 

Check Zend_Acl and lots of tutorials on how to use it. Also see this video on how to use Zend_Navigation and Zend_Acl to render navigation based on roles.

Gordon
Gordon, thank you for the answer. While I'd need a blanket access control now, I might need ACL down the line when I need a fine-grained control.
ekalaivan
+4  A: 

Since you have three types of users (or roles), it sounds like role-based access control would make your life easier. Here is a link to a list of a few implementations in PHP - I'd suggest glancing through and picking the one that looks most like what you want.

http://swik.net/RBAC+PHP

Also, if none of those work out, this article gives a tutorial on how to build your own (complete with source): http://www.webreference.com/programming/php%5F5%5Fcms%5Fframework%5Fdevelopment2/

danben
Danben, thank you for your help. Will one of these let me generate menus based on the privileges on the fly?
ekalaivan
+1 for the tutorial
Juraj Blahunka