[IMP]Auth plugin : namespace config variables
This commit is contained in:
parent
2fa9f8e577
commit
0230508e19
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user