Added user role to captured Sentry data

closes https://github.com/TryGhost/Team/issues/2241

- as part of the authenticated application setup, update the captured Sentry data with the user role
- helps narrow things down when we see permission errors pop up due to requests being made for endpoints that the current user doesn't have permission to access
This commit is contained in:
Kevin Ansfield 2022-12-05 17:15:49 +00:00
parent fe99a000f1
commit 0e181c84b2

View File

@ -54,7 +54,8 @@ export default class SessionService extends ESASessionService {
return new Promise((resolve) => {
resolve({
...event,
release: `ghost@${this.config.version}`
release: `ghost@${this.config.version}`,
'user.role': this.session.user.role.name
});
});
});