mirror of https://github.com/zulip/zulip.git
sentry: Add user role in user_info object.
As part of issue #15344, the error report emails add the user role information. This commit adds the user role information to be used by sentry as well.
This commit is contained in:
parent
be6b2b248f
commit
f9cbefac41
|
@ -19,6 +19,7 @@ def add_context(event: 'Event', hint: 'Hint') -> 'Event':
|
|||
if user_info.get("id"):
|
||||
user_profile = get_user_profile_by_id(user_info["id"])
|
||||
user_info["realm"] = user_profile.realm.string_id or 'root'
|
||||
user_info["role"] = user_profile.get_role_name()
|
||||
return event
|
||||
|
||||
def setup_sentry(dsn: Optional[str], *integrations: Integration) -> None:
|
||||
|
|
Loading…
Reference in New Issue