|
Leosac
0.8.0
Open Source Access Control
|
Go to the documentation of this file.
21 #include "core/audit/ScheduleEvent_odb.h"
25 #include "tools/Schedule_odb.h"
32 std::shared_ptr<ScheduleEvent>
37 ASSERT_LOG(target_sched,
"Credential shall not be null.");
38 ASSERT_LOG(target_sched->id(),
"Credential must be already persisted.");
45 audit->target(target_sched);
65 ASSERT_LOG(sched->id(),
"Schedule has no id.");
67 auto sched_odb = assert_cast<Tools::SchedulePtr>(sched);
106 using namespace FlagSetOperator;
107 std::stringstream ss;
129 desc[
"name"] = t->name();
virtual void author(Auth::UserPtr user) override
Set the author of the entry.
An optional transaction is an object that behave like an odb::transaction if there is no currently ac...
void commit()
Commit the transaction, if there was no currently active transaction at the time of this object's cre...
virtual void target(Tools::ISchedulePtr sch) override
Set the user that is targeted by the event.
const std::string & after() const override
std::shared_ptr< AuditEntry > AuditEntryPtr
#define ASSERT_LOG(cond, msg)
void database(DBPtr db)
Set the database pointer.
std::shared_ptr< odb::database > DBPtr
std::string before_
Optional JSON dump of the object before the event took place.
Tools::ScheduleId target_id() const override
The Audit namespace provides classes and facilities to keep track of what's happening on the Leosac d...
This is the header file for a generated source file, GitSHA1.cpp.
static std::shared_ptr< ScheduleEvent > create_empty()
A factory function for usage in tests.
virtual bool finalized() const override
Is this entry finalized.
std::string generate_target_description() const
std::string generate_description() const override
Generate a description for this event.
std::shared_ptr< ScheduleEvent > ScheduleEventPtr
virtual IAuditEntryPtr parent() const override
Retrieve the parent of this entry.
static std::shared_ptr< ScheduleEvent > create(const DBPtr &database, Tools::ISchedulePtr target_sched, AuditEntryPtr parent)
std::string after_
Optional JSON dump of the object after the event took place.
Tools::ScheduleLWPtr target_
Tools::ScheduleId target_sched_id_
Provides an implementation of IScheduleEvent.
const std::string & before() const override
Auth::UserLPtr author_
The user at the source of the entry.