2008年8月18日星期一

Re: [fw-auth] Help with multiple roles

Forgot to mention, here is the simplified ER Diagram I was thinking of
setting up to accomplish my below goal:

Users:
id
username

Roles:
id
role_name

Departments:
id
department_name

UserDeptAssociation
user_id (foreign key to Users.id)
department_id (foreign key to Departments.id
role_id (foreign key to Roles.id)

Does anyone see any potential problem with the above implementation? I
figure during the authentication process (which uses Zend_Auth_Adapter_Ldap)
I will check the the association table of the user and give the user the
appropriate ACL. Does this make sense?


humansky wrote:
>
> I'm trying to figure out the best mechanism for setting up Zend_Acl
> for a "News" web app. Currently I have several departments (50+) and
> several users (1000+). A user can be a member of one or more
> department. There are three departmental roles; author, editor, and
> administrator and one generic "super user" role. Now here is the
> tricky part, a user can be an author for one department but an editor
> for another department, and if they are a departmental administrator,
> they inherit both author and editor permission as well as have the
> ability to add users to their department or change the roles of
> current users. Also, if you are a departmental administrator, editor,
> or author, then you can ONLY manage news stories related to your
> department. And of course there is the super user that can add
> departmental administrators. How would you recommend I set up Zend_Acl
> under this scenario? Please let me know if you need more information,
> given this is my first post and I'm new to Zend Framework, please go
> easy on me ;-)
>
> Thank you,
> Henry
>
>

--
View this message in context: http://www.nabble.com/Help-with-multiple-roles-tp19039466p19040598.html
Sent from the Zend Auth mailing list archive at Nabble.com.

没有评论: