summaryrefslogtreecommitdiff
path: root/indoteknik_api/controllers/api_v1/user.py
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2023-11-16 16:35:11 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2023-11-16 16:35:11 +0700
commit7ba598c8ac2a707e93134e97f34b8668a530fd17 (patch)
tree6c98b04926bfe8efa614b1e5eeecf8f1d9a7fd23 /indoteknik_api/controllers/api_v1/user.py
parent4730df5bf97724cd906c8118178407bfbf206bca (diff)
modification api users for wms
Diffstat (limited to 'indoteknik_api/controllers/api_v1/user.py')
-rw-r--r--indoteknik_api/controllers/api_v1/user.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/indoteknik_api/controllers/api_v1/user.py b/indoteknik_api/controllers/api_v1/user.py
index 2b297e5d..2848f347 100644
--- a/indoteknik_api/controllers/api_v1/user.py
+++ b/indoteknik_api/controllers/api_v1/user.py
@@ -42,13 +42,14 @@ class User(controller.Controller):
uid = request.session.authenticate(
config.get('db_name'), email, password)
user = request.env['res.users'].browse(uid)
- role = []
+ role = ''
+
if user.is_inbound and user.is_outbound:
- role.append('admin')
+ role = 'admin'
elif user.is_outbound:
- role.append('outbound')
+ role = 'outbound'
elif user.is_inbound:
- role.append('inbound')
+ role = 'inbound'
data = {
'is_auth': True,
'role': role,