From 7bcfc0608bad5319bb9a133b6948d3968f847a09 Mon Sep 17 00:00:00 2001 From: Justin Merz Date: Wed, 29 Apr 2020 16:32:20 -0700 Subject: [PATCH] switch check from admin in remote login --- ckanext/ecosis/controller/user/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ckanext/ecosis/controller/user/__init__.py b/ckanext/ecosis/controller/user/__init__.py index 09e7b15..f03924e 100644 --- a/ckanext/ecosis/controller/user/__init__.py +++ b/ckanext/ecosis/controller/user/__init__.py @@ -76,6 +76,8 @@ def create_remote_login_response(user): # orgs = logic.get_action('organization_list_for_user')(context,{"permission": "create_dataset"}) user = logic.get_action('user_show')(context, {'id':user}) + is_admin = user.get('sysadmin') + user = { "loggedIn" : True, "username": user['name'], @@ -87,7 +89,6 @@ def create_remote_login_response(user): #"organizations": orgs } - is_admin = isAdmin() if is_admin: user['admin'] = True