From 9eeb02a71ade8e842f54f8b3e91ed5675ea978a3 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 28 Jun 2010 13:26:56 +0200 Subject: [PATCH] auth: Rename mysql_login plugin to phpbb_login. --- conf/auth/{mysql_login.py => phpbb_login.py} | 16 ++++++++-------- conf/farmconfig.py | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) rename conf/auth/{mysql_login.py => phpbb_login.py} (89%) diff --git a/conf/auth/mysql_login.py b/conf/auth/phpbb_login.py similarity index 89% rename from conf/auth/mysql_login.py rename to conf/auth/phpbb_login.py index b34ecf9..0e93517 100644 --- a/conf/auth/mysql_login.py +++ b/conf/auth/phpbb_login.py @@ -13,13 +13,13 @@ from MoinMoin.auth import BaseAuth, ContinueLogin from MoinMoin import log logging = log.getLogger(__name__) -class mysql_login(BaseAuth): +class phpbb_login(BaseAuth): logout_possible = True login_inputs = ['username', 'password'] - def __init__(self, name='mysql', dbhost=None, dbuser=None, dbpass=None, dbname=None, dbport=None, hint=None): + def __init__(self, name='phpbb', dbhost=None, dbuser=None, dbpass=None, dbname=None, dbport=None, hint=None): """ - Authenticate using credentials from a mysql database + Authenticate using credentials from a phpbb database The name parameter should be unique among all authentication methods. @@ -88,7 +88,7 @@ class mysql_login(BaseAuth): import sys import traceback info = sys.exc_info() - logging.error("mysql_login: authentication failed due to exception connecting to DB, traceback follows...") + logging.error("phpbb_login: authentication failed due to exception connecting to DB, traceback follows...") logging.error(''.join(traceback.format_exception(*info))) return False @@ -99,7 +99,7 @@ class mysql_login(BaseAuth): username = kw.get('username') password = kw.get('password') - logging.debug("mysql_login: Trying to log in, username=%r " % (username)) + logging.debug("phpbb_login: Trying to log in, username=%r " % (username)) # simply continue if something else already logged in # successfully @@ -114,10 +114,10 @@ class mysql_login(BaseAuth): # Login incorrect if (not email): - logging.debug("mysql_login: authentication failed for %s" % (username)) + logging.debug("phpbb_login: authentication failed for %s" % (username)) return ContinueLogin(user_obj) - logging.debug("mysql_login: authenticated %s (email %s)" % (username, email)) + logging.debug("phpbb_login: authenticated %s (email %s)" % (username, email)) u = user.User(request, auth_username=username, auth_method=self.name, auth_attribs=('name', 'password', 'email')) u.email = email @@ -129,7 +129,7 @@ class mysql_login(BaseAuth): import sys import traceback info = sys.exc_info() - logging.error("mysql_login: authentication failed due to unexpected exception, traceback follows...") + logging.error("phpbb_login: authentication failed due to unexpected exception, traceback follows...") logging.error(''.join(traceback.format_exception(*info))) return ContinueLogin(user_obj) diff --git a/conf/farmconfig.py b/conf/farmconfig.py index a0aba10..2dd9e2b 100644 --- a/conf/farmconfig.py +++ b/conf/farmconfig.py @@ -165,9 +165,9 @@ class FarmConfig(DefaultConfig): require_comment = True # Authentication - from auth.mysql_login import mysql_login # This comes from plugin + from auth.phpbb_login import phpbb_login # This comes from plugin from dbsettings import phpbb_dbhost, phpbb_dbuser, phpbb_dbpass, phpbb_dbname - phpbb = mysql_login( + phpbb = phpbb_login( name = 'phpbb', dbhost = phpbb_dbhost, dbuser = phpbb_dbuser, -- 2.30.2