Loading portal/rest/users/users.py +3 −2 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ class UserResource(Resource): if policies.check_sysadmin(client): full = True log.debug(f'authorized for full user profile change: {full}') json_data = request.get_json() if not json_data: raise PortalAPIError(400, message='No data provided for user update.') Loading @@ -51,9 +52,9 @@ class UserResource(Resource): log.warn(data) user.email = data['email'] user.uco = data['uco'] if data.get('name') is None: if data.get('name') is not None: user.name = data['name'] if data.get("is_admin") and full: if (data.get("is_admin") is not None) and full: user.is_admin = data['is_admin'] log.debug(f"updating user: {user}") Loading Loading
portal/rest/users/users.py +3 −2 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ class UserResource(Resource): if policies.check_sysadmin(client): full = True log.debug(f'authorized for full user profile change: {full}') json_data = request.get_json() if not json_data: raise PortalAPIError(400, message='No data provided for user update.') Loading @@ -51,9 +52,9 @@ class UserResource(Resource): log.warn(data) user.email = data['email'] user.uco = data['uco'] if data.get('name') is None: if data.get('name') is not None: user.name = data['name'] if data.get("is_admin") and full: if (data.get("is_admin") is not None) and full: user.is_admin = data['is_admin'] log.debug(f"updating user: {user}") Loading