summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2022-11-03 11:36:12 +0700
committerIT Fixcomart <it@fixcomart.co.id>2022-11-03 11:36:12 +0700
commit76ccac9630b60ca3774eb83fb13f1a89ee3cabf1 (patch)
tree75a579c5c5110b18d59d4a36262af14a3750b80b
parentbf2c45407b6bde11d63d4043435c932320f141de (diff)
Authenticate in whitelist
-rw-r--r--indoteknik_api/controllers/controller.py2
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