Return employee_uuid along with user info, from API

occasionally that is useful
This commit is contained in:
Lance Edgar 2020-02-26 21:29:37 -06:00
parent a79bf3f055
commit c145d077cd

View file

@ -104,6 +104,7 @@ class APIView(View):
"""
# basic / default info
is_admin = user.is_admin()
employee = user.employee
info = {
'uuid': user.uuid,
'username': user.username,
@ -111,6 +112,7 @@ class APIView(View):
'short_name': user.get_short_name(),
'is_admin': is_admin,
'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