diff pylons_app/controllers/admin.py @ 46:9db7782727b3

Static files for production fixed Error handler for debug on, added admin auth function authenticates only admins changed creation of db
author Marcin Kuzminski <marcin@python-blog.com>
date Wed, 07 Apr 2010 19:39:31 +0200
parents a886f5eba757
children f6ac79182600
line wrap: on
line diff
--- a/pylons_app/controllers/admin.py	Wed Apr 07 17:28:10 2010 +0200
+++ b/pylons_app/controllers/admin.py	Wed Apr 07 19:39:31 2010 +0200
@@ -30,8 +30,7 @@
 
             try:
                 c.form_result = login_form.to_python(dict(request.params))
-                if auth.authfunc(None, c.form_result['username'], c.form_result['password']) and\
-                    c.form_result['username'] == 'admin':
+                if auth.admin_auth(c.form_result['username'], c.form_result['password']):
                     session['admin_user'] = True
                     session['admin_username'] = c.form_result['username']
                     session.save()