[Zope] Different Login Screens for Management and User?

Ty Sarna tsarna@endicor.com
2 Mar 2000 20:21:25 GMT


In article <4.2.2.20000229130047.00b88100@saladin.aisys.com>,
James W. Howe <jwh@allencreek.com> wrote:
> management team to login and perform management activities.  I would like 
> to present a different login screen (maybe just a basic auth dialog) to 
> allow access to management functions.  I've been playing around a little 
> with GUF, but I haven't found a way to present two different login screens 
> based on the type of page being accessed.  Is this type of functionality 
> possible with Zope?  Would the LoginManager allow for this sort of thing?

LoginManager now has this capability. The loginForm is passed
"needroles", the list of roles one would have to have one of to perform
the action that prompted the login. Thus you could do:

 <dtml-if "'Member' in needroles">
  ... member login form ...
 <dtml-else>
  ... manager login form ...
 </dtml-if>

(note that 'Manager' is likely allowed to do both member and manager
things, and thus checking "'Manager' in needroles" would be true in
either case and not do what you want)