diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2022-11-03 11:36:12 +0700 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2022-11-03 11:36:12 +0700 |
| commit | 76ccac9630b60ca3774eb83fb13f1a89ee3cabf1 (patch) | |
| tree | 75a579c5c5110b18d59d4a36262af14a3750b80b /indoteknik_api/controllers | |
| parent | bf2c45407b6bde11d63d4043435c932320f141de (diff) | |
Authenticate in whitelist
Diffstat (limited to 'indoteknik_api/controllers')
| -rw-r--r-- | indoteknik_api/controllers/controller.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/indoteknik_api/controllers/controller.py b/indoteknik_api/controllers/controller.py index 9de2fd4c..d1ecab57 100644 --- a/indoteknik_api/controllers/controller.py +++ b/indoteknik_api/controllers/controller.py @@ -5,6 +5,7 @@ import json from odoo import http from odoo.http import request +from odoo.tools.config import config from pytz import timezone import logging @@ -31,6 +32,7 @@ class Controller(http.Controller): # rafizadanly localhost allowed_ip_address.append('182.253.155.143') if remote_address in allowed_ip_address: + request.session.authenticate(config.get('db_name'), 'it@fixcomart.co.id', 'Fixcomart378') return True return False |
