From 503e30c04b060813dc1ce094a27d61ad372377e9 Mon Sep 17 00:00:00 2001 From: terrtia Date: Thu, 5 Sep 2024 16:58:12 +0200 Subject: [PATCH] chg: [user profile] show user organisation --- bin/lib/ail_users.py | 2 +- var/www/templates/settings/user_profile.html | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/lib/ail_users.py b/bin/lib/ail_users.py index 514d778d..adb30562 100755 --- a/bin/lib/ail_users.py +++ b/bin/lib/ail_users.py @@ -585,7 +585,7 @@ def api_get_users_meta(): return meta def api_get_user_profile(user_id): - options = {'api_key', 'role', '2fa', 'org'} + options = {'api_key', 'role', '2fa', 'org', 'org_name'} user = AILUser(user_id) if not user.exists(): return {'status': 'error', 'reason': 'User not found'}, 404 diff --git a/var/www/templates/settings/user_profile.html b/var/www/templates/settings/user_profile.html index 41a10f2e..01f71b4e 100644 --- a/var/www/templates/settings/user_profile.html +++ b/var/www/templates/settings/user_profile.html @@ -43,6 +43,13 @@ Email {{meta['id']}} + + Organisation + + {{meta['org_name']}}
+ {{meta['org']}} + + Role {{meta['role']}}