1
0
Fork 0

* infrastructure for authkit

* menu generation code
* improved templates
* database and basic role setup in websetup.py
This commit is contained in:
Jan Dittberner 2008-06-05 16:24:43 +00:00
parent 096df406b8
commit 55124e861f
20 changed files with 431 additions and 68 deletions

View file

@ -20,8 +20,10 @@ class BaseController(WSGIController):
"""Invoke the Controller"""
conn = meta.engine.connect()
meta.Session.configure(bind=conn)
c.menu = model.Menu.allowed(session['user'] if 'user' in session \
else None)
c.menu = model.Menu.allowed(environ['authkit.users'].user_roles(
environ['REMOTE_USER']) if 'REMOTE_USER' in environ else [])
c.messages = {'errors' : [],
'messages' : []}
try:
# WSGIController.__call__ dispatches to the Controller method
# the request is routed to. This routing information is