|
Leosac
0.8.0
Open Source Access Control
|
Go to the documentation of this file.
22 #include "core/audit/AccessPointEvent_odb.h"
36 std::shared_ptr<AccessPointEvent>
41 ASSERT_LOG(target_ap,
"Target AccessPoint must be non null.");
42 ASSERT_LOG(target_ap->id(),
"Target AccessPoint must be already persisted.");
51 audit->target(target_ap);
65 ASSERT_LOG(ap->id(),
"AccessPoint has no id.");
66 auto ap_odb = std::dynamic_pointer_cast<Auth::AccessPoint>(ap);
67 ASSERT_LOG(ap_odb,
"IAccessPoint is not of type AccessPoint.");
104 std::stringstream ss;
108 <<
" has been created.";
113 <<
" has been deleted.";
125 desc[
"alias"] = t->alias();
Auth::AccessPointId target_ap_id_
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...
std::shared_ptr< AuditEntry > AuditEntryPtr
Auth::AccessPointId target_id() const override
#define ASSERT_LOG(cond, msg)
void database(DBPtr db)
Set the database pointer.
std::shared_ptr< odb::database > DBPtr
Provides an implementation of IAccessPointEvent.
std::string after_
Optional JSON dump of the object after the event took place.
std::shared_ptr< IAccessPoint > IAccessPointPtr
static std::shared_ptr< AccessPointEvent > create_empty()
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.
virtual bool finalized() const override
Is this entry finalized.
std::string before_
Optional JSON dump of the object before the event took place.
const std::string & after() const override
std::string generate_target_description() const
Generate a short description for the targeted AP.
virtual IAuditEntryPtr parent() const override
Retrieve the parent of this entry.
const std::string & before() const override
static std::shared_ptr< AccessPointEvent > create(const DBPtr &database, Auth::IAccessPointPtr target_ap, AuditEntryPtr parent)
virtual void target(Auth::IAccessPointPtr door) override
Set the AccessPoint that is targeted by the event.
std::string generate_description() const override
Generate a description for this event.
std::shared_ptr< AccessPointEvent > AccessPointEventPtr
Auth::AccessPointLWPtr target_
unsigned long AccessPointId