mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 00:28:22 +00:00
chg: [user profile] show user organisation
This commit is contained in:
parent
7bc2b16fd9
commit
503e30c04b
2 changed files with 8 additions and 1 deletions
|
@ -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
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue