Leosac
0.8.0
Open Source Access Control
|
Represent one of the mapping of a schedule. More...
#include <ScheduleMapping.hpp>
Public Member Functions | |
ScheduleMappingId | id () const |
const std::string & | alias () const |
void | alias (const std::string &) |
ScheduleId | schedule_id () const |
Retrieve the id of the owning schedule. More... | |
ScheduleLWPtr | schedule () const |
const std::vector< Auth::UserLWPtr > & | users () const |
const std::vector< Auth::GroupLWPtr > & | groups () const |
const std::vector< Cred::CredentialLWPtr > & | credentials () const |
const std::vector< Auth::DoorLWPtr > & | doors () const |
size_t | odb_version () const |
bool | has_user (Auth::UserId) const |
Check if the user with id uid is directly part of the mapping. More... | |
bool | has_group (Auth::GroupId) const |
Check if the group is directly mapping by the ScheduleMapping object. More... | |
bool | has_cred (Cred::CredentialId) const |
Check if the credential is mapped by this ScheduleMapping. More... | |
bool | has_door (Auth::DoorId) const |
Check if the door is mapped by this object. More... | |
bool | has_user_indirect (Auth::UserPtr) const |
Check wether the user is mapped, either directly or not, by this ScheduleMapping object. More... | |
void | add_door (const Auth::DoorLPtr &door) |
Add a door to the mapping. More... | |
void | clear_doors () |
void | add_user (const Auth::UserLPtr &user) |
Add a user to the mapping. More... | |
void | clear_users () |
void | add_group (const Auth::GroupLPtr &group) |
Add a group to the mapping. More... | |
void | clear_groups () |
void | add_credential (const Cred::CredentialLPtr &cred) |
Add a credential to the mapping. More... | |
void | clear_credential () |
Public Attributes | |
ScheduleMappingId | id_ |
Protected Attributes | |
std::vector< Auth::UserLWPtr > | users_ |
std::vector< Auth::GroupLWPtr > | groups_ |
std::vector< Cred::CredentialLWPtr > | creds_ |
std::vector< Auth::DoorLWPtr > | doors_ |
ScheduleLWPtr | schedule_ |
The schedule that owns the mapping. More... | |
std::string | alias_ |
A non unique, optional alias. More... | |
size_t | odb_version_ |
Friends | |
class | Schedule |
class | odb::access |
Represent one of the mapping of a schedule.
This object is designed to be embedded into Schedule object.
Definition at line 37 of file ScheduleMapping.hpp.
void ScheduleMapping::add_credential | ( | const Cred::CredentialLPtr & | cred | ) |
Add a credential to the mapping.
This call will notify the credential object (when possible) that it has been added to the mapping.
Definition at line 151 of file ScheduleMapping.cpp.
void ScheduleMapping::add_door | ( | const Auth::DoorLPtr & | door | ) |
Add a door to the mapping.
This call properly notify the door object (if eager) that a ScheduleMapping has added it into its mapping.
Definition at line 124 of file ScheduleMapping.cpp.
void ScheduleMapping::add_group | ( | const Auth::GroupLPtr & | group | ) |
Add a group to the mapping.
This call will notify the group object (when possible) that it has been added to the mapping.
Definition at line 142 of file ScheduleMapping.cpp.
void ScheduleMapping::add_user | ( | const Auth::UserLPtr & | user | ) |
Add a user to the mapping.
This call will notify the user object (when possible) that it has been added to the mapping.
Definition at line 133 of file ScheduleMapping.cpp.
const std::string & ScheduleMapping::alias | ( | ) | const |
Definition at line 40 of file ScheduleMapping.cpp.
void ScheduleMapping::alias | ( | const std::string & | a | ) |
Definition at line 45 of file ScheduleMapping.cpp.
void ScheduleMapping::clear_credential | ( | ) |
Definition at line 195 of file ScheduleMapping.cpp.
void ScheduleMapping::clear_doors | ( | ) |
Definition at line 180 of file ScheduleMapping.cpp.
void ScheduleMapping::clear_groups | ( | ) |
Definition at line 190 of file ScheduleMapping.cpp.
void ScheduleMapping::clear_users | ( | ) |
Definition at line 185 of file ScheduleMapping.cpp.
const std::vector< Cred::CredentialLWPtr > & ScheduleMapping::credentials | ( | ) | const |
Definition at line 170 of file ScheduleMapping.cpp.
const std::vector< Auth::DoorLWPtr > & ScheduleMapping::doors | ( | ) | const |
Definition at line 175 of file ScheduleMapping.cpp.
const std::vector< Auth::GroupLWPtr > & ScheduleMapping::groups | ( | ) | const |
Definition at line 165 of file ScheduleMapping.cpp.
bool ScheduleMapping::has_cred | ( | Cred::CredentialId | cid | ) | const |
Check if the credential is mapped by this ScheduleMapping.
Definition at line 82 of file ScheduleMapping.cpp.
bool ScheduleMapping::has_door | ( | Auth::DoorId | did | ) | const |
Check if the door is mapped by this object.
Definition at line 92 of file ScheduleMapping.cpp.
bool ScheduleMapping::has_group | ( | Auth::GroupId | gid | ) | const |
Check if the group is directly mapping by the ScheduleMapping object.
Definition at line 72 of file ScheduleMapping.cpp.
bool ScheduleMapping::has_user | ( | Auth::UserId | uid | ) | const |
Check if the user with id uid
is directly part of the mapping.
Definition at line 62 of file ScheduleMapping.cpp.
bool ScheduleMapping::has_user_indirect | ( | Auth::UserPtr | user | ) | const |
Check wether the user is mapped, either directly or not, by this ScheduleMapping object.
Being mapped indirectly means that either at least one of the user's groups or credential is mapped.
Definition at line 102 of file ScheduleMapping.cpp.
ScheduleMappingId ScheduleMapping::id | ( | ) | const |
Definition at line 35 of file ScheduleMapping.cpp.
size_t ScheduleMapping::odb_version | ( | ) | const |
Definition at line 200 of file ScheduleMapping.cpp.
ScheduleLWPtr ScheduleMapping::schedule | ( | ) | const |
Definition at line 57 of file ScheduleMapping.cpp.
ScheduleId ScheduleMapping::schedule_id | ( | ) | const |
Retrieve the id of the owning schedule.
Definition at line 50 of file ScheduleMapping.cpp.
const std::vector< Auth::UserLWPtr > & ScheduleMapping::users | ( | ) | const |
Definition at line 160 of file ScheduleMapping.cpp.
|
friend |
Definition at line 168 of file ScheduleMapping.hpp.
|
friend |
Definition at line 167 of file ScheduleMapping.hpp.
|
protected |
A non unique, optional alias.
Definition at line 161 of file ScheduleMapping.hpp.
|
protected |
Definition at line 145 of file ScheduleMapping.hpp.
|
protected |
Definition at line 150 of file ScheduleMapping.hpp.
|
protected |
Definition at line 140 of file ScheduleMapping.hpp.
ScheduleMappingId Leosac::Tools::ScheduleMapping::id_ |
Definition at line 129 of file ScheduleMapping.hpp.
|
protected |
Definition at line 164 of file ScheduleMapping.hpp.
|
protected |
The schedule that owns the mapping.
Definition at line 156 of file ScheduleMapping.hpp.
|
protected |
Definition at line 135 of file ScheduleMapping.hpp.