Provide current-user application-wide

* This change allows us to reuse the current user in multiple places.
* Sentry still receives the same information as before.
This commit is contained in:
Sebastian Serth
2023-09-06 22:22:33 +02:00
committed by Sebastian Serth
parent 50a4707f65
commit 33aa0cecba
3 changed files with 8 additions and 6 deletions

View File

@ -84,11 +84,12 @@ class User < ApplicationRecord
displayname
end
def to_sentry_context
def to_page_context
{
id:,
type: self.class.name,
consumer: consumer.name,
displayname:,
}
end