Zend_Acl and Zend _Auth
I have a directory layout like this:
apps/default/views
/controllers
/news/views
/controllers
/products/views
/controllers
/supports
lib/Zend
www/css
/images
/js
I want to use zend_acl and zend_auth check validation and role of user each time they logon to website.
•guest (not authenticated) - Guests can access 'default', 'news' and 'supports' only. Guests attempting to access member-only content will be asked to authenticate.
•member (authenticated) - Access all top-level controllers. Can update forum posts but only those authored by themselves. Not allowed access to admin section. Access to 'admin' will result in 'privileges' error message.
•admin (authenticated) - Unrestricted access.
This is mysql file:
-- ----------------------------
-- Table structure for tbl_roles
-- ----------------------------
CREATE TABLE `tbl_roles` (
`roleid` int(4) NOT NULL auto_increment,
`rolename` varchar(255) default NULL,
PRIMARY KEY (`roleid`)
)
-- ----------------------------
-- Table structure for tbl_users
-- ----------------------------
CREATE TABLE `tbl_users` (
`uid` int(4) NOT NULL auto_increment,
`roleid` int(4) NOT NULL,
`firstname` varchar(255) NOT NULL,
`lastname` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
PRIMARY KEY (`uid`)
)
Can you give me a clear example about this problem. I am a new bie with php and zend framework. Thanks you
|