diff MoinMoin/app.py @ 1277:f0d1cbe58e53

refactored "trusted" user handling there is a new .trusted user object attribute now. all authenticator constructors have a parameter trusted=True/False now (implemented in the base class). if one sets it to True, user objects created by that authenticator will have u.trusted = True. The default is False. it is also stored into the session, so user object created from a session have .trusted also maintained. Killed cfg.auth_methods_trusted, can be done more easily now. Refactored all auth classes to user super() to call the base class __init__ with any keywords they did not use. If the base class gets keywords it does not know, it raises a TypeError.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 03 Mar 2012 16:37:14 +0100
parents 8c275efc6e8c
children f5e17549eda3 8109d2d763d1
line wrap: on
line diff
--- a/MoinMoin/app.py	Sat Mar 03 02:55:40 2012 +0100
+++ b/MoinMoin/app.py	Sat Mar 03 16:37:14 2012 +0100
@@ -215,6 +215,7 @@
     # if we have a valid user we store it in the session
     if userobj.valid:
         session['user.itemid'] = userobj.itemid
+        session['user.trusted'] = userobj.trusted
         session['user.auth_method'] = userobj.auth_method
         session['user.auth_attribs'] = userobj.auth_attribs
     return userobj