chg: [user profile] show user organisation

This commit is contained in:
terrtia 2024-09-05 16:58:12 +02:00
parent 7bc2b16fd9
commit 503e30c04b
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
2 changed files with 8 additions and 1 deletions

View file

@ -585,7 +585,7 @@ def api_get_users_meta():
return meta return meta
def api_get_user_profile(user_id): 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) user = AILUser(user_id)
if not user.exists(): if not user.exists():
return {'status': 'error', 'reason': 'User not found'}, 404 return {'status': 'error', 'reason': 'User not found'}, 404

View file

@ -43,6 +43,13 @@
<td>Email</td> <td>Email</td>
<td>{{meta['id']}}</td> <td>{{meta['id']}}</td>
</tr> </tr>
<tr>
<td>Organisation</td>
<td>
{{meta['org_name']}}<br>
{{meta['org']}}
</td>
</tr>
<tr> <tr>
<td>Role</td> <td>Role</td>
<td>{{meta['role']}}</td> <td>{{meta['role']}}</td>