32 #pragma db object polymorphic callback(odb_callback) 40 static std::shared_ptr<UserEvent>
54 virtual void before(
const std::string &repr)
override;
56 const std::string &
before()
const override;
58 const std::string &
after()
const override;
60 virtual void after(
const std::string &repr)
override;
virtual Auth::UserLPtr target() const override
Auth::UserId target_id() const override
Retrieve the user_id that was targeted by this event.
Implementation of IAuditEntry, backed by ODB.
This is the header file for a generated source file, GitSHA1.cpp.
odb::lazy_shared_ptr< User > UserLPtr
virtual ~UserEvent()=default
std::string before_
Optional JSON dump of the object before the event took place.
virtual IAuditEntryPtr parent() const override
Retrieve the parent of this entry.
Provides an implementation of IUserEvent.
std::string generate_target_description() const
Generate a small json-string to describe the target user.
std::shared_ptr< AuditEntry > AuditEntryPtr
std::shared_ptr< User > UserPtr
static std::shared_ptr< UserEvent > create_empty()
std::string generate_description() const override
Generate a description for this event.
std::string after_
Optional JSON dump of the object after the event took place.
const std::string & before() const override
odb::lazy_weak_ptr< User > UserLWPtr
static std::shared_ptr< UserEvent > create(const DBPtr &database, Auth::UserPtr target_user, AuditEntryPtr parent)
const std::string & after() const override
std::shared_ptr< odb::database > DBPtr
void database(DBPtr db)
Set the database pointer.
Provide static methods to instanciate various Audit objects.
Interface that describes an Audit object when a user-related event happens.