Implementing Access Control using Zend_Acl(DB version)

intro
This article shows code of access control using Zend_Acl especially with DB.
You can see the screens from the demonstration site.

1.Create Tables
In this article, the following tables are used.
2.Create Controller
Create the file application/constorllers/MessageController.php with the following content.

This controller checks the access privileges including the resource in the function preDispatch.
3.Create Models
Create the file application/models/acls/MessageAcl.php with the following content.

This class sets the acl including resources in the constructor.
The other models are same as the previous article.
4.Create Views
The views are same as the previous article.

5.Check
Access the web server and check that some members can’t edit messages.
History
Date Content
2008/5/10 Published

One Comment

  1. Wow. This is the first time I’ve seen someone not blabber on for years and produce 10 lines of code I could figure out myself. I haven’t even begun to read through you’re articles, but I’m very excited. You’re personality fits me well.

Leave a Reply

Your email address will not be published. Required fields are marked *