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


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-27-2007, 04:21 AM
quannm0410l's Avatar
Junior Member
 
Join Date: Mar 2007
Posts: 11
Post 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-27-2007, 06:28 AM
Cristian's Avatar
Administrator
 
Join Date: Feb 2007
Location: Sibiu, Romania
Posts: 99
Default

I didn't used those components , but there are some tutorials (even a new one) related to use of Auth and ACL

Check:

Zend Auth Tutorials
Zend ACL Tutorials
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-27-2007, 11:05 PM
SpotSec's Avatar
Senior Member
 
Join Date: Feb 2007
Location: United States
Posts: 121
Default

That should be a simple setup, I will be using Zend_Acl and Zend_Auth (already implemented) in by the next week, so I'll tell you how it goes
__________________
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
  #4 (permalink)  
Old 03-28-2007, 02:36 AM
quannm0410l's Avatar
Junior Member
 
Join Date: Mar 2007
Posts: 11
Default

thank you very munch
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-29-2007, 07:34 PM
Cristian's Avatar
Administrator
 
Join Date: Feb 2007
Location: Sibiu, Romania
Posts: 99
Default

I am interested myself...

I didn't used Auth and ACL, seems a nice thing but without a db with users and roles (as quannm0410l asked) can't find this very usefull...

Btw, this could be even a new ZF component... I got tons of ideas, but not much time for implementing myself
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 03-29-2007, 09:04 PM
SpotSec's Avatar
Senior Member
 
Join Date: Feb 2007
Location: United States
Posts: 121
Default

actually it doesnt require you to use a db to store users and roles. It is actually up to the programmer to decide how to store the roles and users. Zend_Auth needs to be extended with adapters and roles can be stored to a file be serializing the acl object and writing to the file.
__________________
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
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 09:38 PM.