RE: Extending login to include roles?

"Schnitzer, Jeff" <[email protected]>
Newsgroups gmane.comp.web.maverick.general
Message-ID <[email protected]>
Here is one suggestion:  Have your 'Maintainer' controllers extend a
MaintainerBase controller.  The perform() method of the MaintainerBase
should perform your security check and then forward on to the derived
maintainerPerform() method.  Do the same with Administrators and Users.

This is an adaptation of the pattern that Friendbook uses.

 

Another option is to have a base class that looks for controller
properties (set in the maverick config file) that describe which pages
require which roles.  Then your login process would set a session
attribute which defines the role for that user.

 

Jeff Schnitzer

[email protected]

 

 

-----Original Message-----
From: Steve Knight [mailto:[email protected]] 
Sent: Wednesday, June 11, 2003 10:48 AM
To: [email protected]
Subject: [Mav-user] Extending login to include roles?

 

Hello,

 

I was thinking of extending the login funtionality of the friendbook
example to include checking for user roles.  For example, I'll have 3
types of user roles: Administrators, Maintainers and Users.  "Users" can
only access user pages, "Maintainers" can access user and maintenance
pages, while "Administrators" can access user, maintenance, and
administration pages.

 

Any thoughts/comments on the best way to do this would be much
appreciated.

 

Thanks,

 

Steve

 


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.488 / Virus Database: 287 - Release Date: 05/06/2003
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.