Return employee_uuid along with user info, from API
occasionally that is useful
This commit is contained in:
parent
a79bf3f055
commit
c145d077cd
|
@ -104,6 +104,7 @@ class APIView(View):
|
||||||
"""
|
"""
|
||||||
# basic / default info
|
# basic / default info
|
||||||
is_admin = user.is_admin()
|
is_admin = user.is_admin()
|
||||||
|
employee = user.employee
|
||||||
info = {
|
info = {
|
||||||
'uuid': user.uuid,
|
'uuid': user.uuid,
|
||||||
'username': user.username,
|
'username': user.username,
|
||||||
|
@ -111,6 +112,7 @@ class APIView(View):
|
||||||
'short_name': user.get_short_name(),
|
'short_name': user.get_short_name(),
|
||||||
'is_admin': is_admin,
|
'is_admin': is_admin,
|
||||||
'is_root': is_admin and self.request.session.get('is_root', False),
|
'is_root': is_admin and self.request.session.get('is_root', False),
|
||||||
|
'employee_uuid': employee.uuid if employee else None,
|
||||||
}
|
}
|
||||||
|
|
||||||
# maybe get/use "extra" info
|
# maybe get/use "extra" info
|
||||||
|
|
Loading…
Reference in a new issue