From 42530be0cfd3fd72095b71575d7479440253da1f Mon Sep 17 00:00:00 2001 From: pieterlukasse Date: Tue, 22 Oct 2024 18:28:24 +0200 Subject: [PATCH] feat: add "active" field to output and align on field name for username --- fence/blueprints/admin.py | 2 +- fence/resources/user/__init__.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fence/blueprints/admin.py b/fence/blueprints/admin.py index f081d6cb9..11a7dd5bb 100644 --- a/fence/blueprints/admin.py +++ b/fence/blueprints/admin.py @@ -78,7 +78,7 @@ def create_user(): Returns a json object """ - username = request.get_json().get("name", None) + username = request.get_json().get("username", None) role = request.get_json().get("role", None) email = request.get_json().get("email", None) display_name = request.get_json().get("display_name", None) diff --git a/fence/resources/user/__init__.py b/fence/resources/user/__init__.py index 3543f875f..152e75057 100644 --- a/fence/resources/user/__init__.py +++ b/fence/resources/user/__init__.py @@ -91,6 +91,7 @@ def get_user_info(current_session, username): "phone_number": user.phone_number, "email": user.email, "is_admin": user.is_admin, + "active": user.active, "role": role, "project_access": dict(user.project_access), "certificates_uploaded": [],