Leosac
0.8.0
Open Source Access Control
|
A authentication group regroup users that share permissions. More...
#include <Group.hpp>
Public Member Functions | |
Group () | |
Group (const std::string &group_name) | |
GroupId | id () const |
Retrieve the unique identifier of the group. More... | |
void | id (const GroupId &new_id) |
Manually set the ID of a group. More... | |
const std::string & | name () const |
void | name (const std::string &name) |
const std::string & | description () const |
void | description (const std::string &desc) |
const std::vector< UserPtr > & | members () const |
std::vector< UserLPtr > | lazy_members () const |
Retrieve lazy pointers to members. More... | |
std::vector< Tools::ScheduleMappingLWPtr > | lazy_schedules_mapping () const |
Returns the vector of lazy_weak_ptr to schedule mapping. More... | |
UserGroupMembershipPtr | member_add (UserPtr m, GroupRank rank=GroupRank::MEMBER) |
IAccessProfilePtr | profile () |
void | profile (IAccessProfilePtr p) |
const UserGroupMembershipSet & | user_memberships () const |
Retrieve the UserGroupMembership that this group is involved with. More... | |
bool | member_has (Auth::UserId user_id, GroupRank *rank_out=nullptr) const |
Check if user_id is a member of this group. More... | |
void | schedule_mapping_added (const Tools::ScheduleMappingPtr &sched_mapping) |
The group has been mapped by a schedule. More... | |
Private Member Functions | |
void | odb_callback (odb::callback_event e, odb::database &) const |
Private Attributes | |
GroupId | id_ |
The group identifier. More... | |
UserGroupMembershipSet | membership_ |
std::vector< Tools::ScheduleMappingLWPtr > | schedules_mapping_ |
std::vector< UserPtr > | loaded_members_ |
This returns a vector of loaded User object. More... | |
std::string | name_ |
std::string | description_ |
A (potentially long) description of the group. More... | |
IAccessProfilePtr | profile_ |
const size_t | version_ |
Friends | |
class | odb::access |
class | GroupValidator |
class | Leosac::TestAccess |
A authentication group regroup users that share permissions.
GroupId Group::id | ( | ) | const |
void Group::id | ( | const GroupId & | new_id | ) |
std::vector< UserLPtr > Group::lazy_members | ( | ) | const |
std::vector< Tools::ScheduleMappingLWPtr > Group::lazy_schedules_mapping | ( | ) | const |
UserGroupMembershipPtr Group::member_add | ( | UserPtr | m, |
GroupRank | rank = GroupRank::MEMBER |
||
) |
bool Group::member_has | ( | Auth::UserId | user_id, |
GroupRank * | rank_out = nullptr |
||
) | const |
|
private |
IAccessProfilePtr Group::profile | ( | ) |
void Group::profile | ( | IAccessProfilePtr | p | ) |
void Group::schedule_mapping_added | ( | const Tools::ScheduleMappingPtr & | sched_mapping | ) |
The group has been mapped by a schedule.
const UserGroupMembershipSet & Group::user_memberships | ( | ) | const |
Retrieve the UserGroupMembership that this group is involved with.
While the set is always eagerly loaded, the group()
and user()
method in each Membership will return lazy weak pointer.
|
friend |
|
friend |
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |