Leosac
0.8.0
Open Source Access Control
|
Concrete implementation of a simple access control class. More...
#include <SimpleAccessProfile.hpp>
Public Member Functions | |
virtual bool | isAccessGranted (const std::chrono::system_clock::time_point &date, AuthTargetPtr target) override |
Does the profile allow access to the user. More... | |
virtual void | addAccessSchedule (AuthTargetPtr target, const Tools::IScheduleCPtr &sched) |
Adds a schedule where access to a given target is allowed. More... | |
virtual const std::vector< Tools::IScheduleCPtr > & | defaultSchedules () const |
virtual const std::map< std::string, std::vector< Tools::IScheduleCPtr > > & | schedules () const |
Returns the map of schedule for each target (except the default target) More... | |
virtual size_t | schedule_count () const override |
Returns the number of schedule associated with the profile. More... | |
Protected Attributes | |
std::map< std::string, std::vector< Tools::IScheduleCPtr > > | schedules_ |
Map target name to target's schedules. More... | |
std::vector< Tools::IScheduleCPtr > | default_schedule_ |
Schedule for default target. More... | |
Concrete implementation of a simple access control class.
Definition at line 39 of file SimpleAccessProfile.hpp.
|
virtual |
Adds a schedule where access to a given target is allowed.
Definition at line 55 of file SimpleAccessProfile.cpp.
|
virtual |
Definition at line 71 of file SimpleAccessProfile.cpp.
|
overridevirtual |
Does the profile allow access to the user.
date | the time point at which we try to get access. |
target | the door we want to open. |
Implements Leosac::Auth::IAccessProfile.
Definition at line 27 of file SimpleAccessProfile.cpp.
|
overridevirtual |
Returns the number of schedule associated with the profile.
Implements Leosac::Auth::IAccessProfile.
Definition at line 76 of file SimpleAccessProfile.cpp.
|
virtual |
Returns the map of schedule for each target (except the default target)
Definition at line 65 of file SimpleAccessProfile.cpp.
|
protected |
Schedule for default target.
Definition at line 73 of file SimpleAccessProfile.hpp.
|
protected |
Map target name to target's schedules.
Definition at line 68 of file SimpleAccessProfile.hpp.