Include email address for current API user info
This commit is contained in:
parent
4030904d40
commit
ec71f532a1
|
@ -101,6 +101,7 @@ class APIView(View):
|
|||
return info
|
||||
"""
|
||||
app = self.get_rattail_app()
|
||||
auth_handler = app.get_auth_handler()
|
||||
|
||||
# basic / default info
|
||||
is_admin = user.is_admin()
|
||||
|
@ -113,6 +114,7 @@ class APIView(View):
|
|||
'is_admin': is_admin,
|
||||
'is_root': is_admin and self.request.session.get('is_root', False),
|
||||
'employee_uuid': employee.uuid if employee else None,
|
||||
'email_address': auth_handler.get_email_address(user),
|
||||
}
|
||||
|
||||
# maybe get/use "extra" info
|
||||
|
|
Loading…
Reference in a new issue