[IMP]Auth plugin : namespace config variables

This commit is contained in:
Fabien BOURGEOIS 2018-05-09 09:16:52 +02:00
parent 2fa9f8e577
commit 0230508e19
1 changed files with 4 additions and 4 deletions

View File

@ -28,8 +28,8 @@ class Auth(BaseAuth):
def __init__(self, configuration, logger):
super(Auth, self).__init__(configuration, logger)
host = self.configuration.get('auth', 'host', fallback='127.0.0.1')
port = self.configuration.get('auth', 'port', fallback=8069)
host = self.configuration.get('auth', 'odoo_host', fallback='127.0.0.1')
port = self.configuration.get('auth', 'odoo_port', fallback=8069)
try:
self.odoo = ODOO(host, port=port)
except RPCError as rpcerr:
@ -38,9 +38,9 @@ class Auth(BaseAuth):
def is_authenticated(self, user, password):
""" Is authenticated main function """
if not self.configuration.has_option('auth', 'database'):
if not self.configuration.has_option('auth', 'odoo_database'):
raise RuntimeError('Database is needed for Odoo Authentication')
database = self.configuration.get('auth', 'database')
database = self.configuration.get('auth', 'odoo_database')
if not user or not password:
return False
try: