The design goal of this class is:
a) provide efficient look-up of access rights,
b) keep similar list functionality out of GrpAccess and UserGroup.
Definition at line 422 of file osbaccess.h.
typedef std::map<Key, GrpAccess> OSB_LIB::GrpAccessMap::Entries |
STL container used to store the access rights.
The definition implies that the access identifier (tag()) must be unique within a parent.
Definition at line 484 of file osbaccess.h.
typedef std::list<Key> OSB_LIB::GrpAccessMap::Path |
The path to an access right.
Definition at line 492 of file osbaccess.h.
Constructor with user group id.
void OSB_LIB::GrpAccessMap::accessRights | ( | std::list< GrpAccess > & | dest, | |
const GrpAccess::Oid & | parId = GrpAccess::Oid() | |||
) | const |
Get child access rights.
dest | STL-container to populate. It is empty if no childs for parId exist. | |
parId | The parent of the access rights to retrieve, if not set the 1st level (root) rights of the group are returned. |
bool OSB_LIB::GrpAccessMap::allowed | ( | const std::string & | rootTag | ) | const |
Check access to a root window.
rootTag | Identifier of the root access. |
void OSB_LIB::GrpAccessMap::check | ( | const GrpAccess & | access | ) | const [private] |
Check a group access.
access | Module group to verify. |
ObjectNotFound | if the parent of access does not exist. | |
OsbException | in case of duplicate access tags for the same parent. | |
OsbException | (internal) if the group id's do not match. |
GrpAccess* OSB_LIB::GrpAccessMap::find | ( | const GrpAccess::Oid & | gaId | ) | [private] |
Find a group access by object id.
Find a group access by its parent and access tag.
key | The parent and the tag of the group access. |
Get a group access by its parent and access tag.
key | The parent and the tag of the group access. |
ObjectNotFound | if the access right for key does not exist. |
const GrpAccess& OSB_LIB::GrpAccessMap::get | ( | const GrpAccess::Oid & | gaId | ) | const |
Get a group access by its object id.
gaId | The object id of the group access. |
ObjectNotFound | if the access right for gaId does not exist. |
void OSB_LIB::GrpAccessMap::insert | ( | GrpAccess & | access | ) | [private] |
Create or replace an existing access right.
access | The access right to insert, it replaces an access right with the same object id. For new access rights the function sets a temporary (negative) object id. |
OsbException | if the parent of access does not exist. | |
OsbException | if GrpAccess::tag() is duplicate within its parent. |
void OSB_LIB::GrpAccessMap::read | ( | const OSB_DB::Session & | session | ) |
Read the access rights from the database.
session | Database to use. |
friend class OSB_DB::GrpAccessGw [friend] |
friend class UserMgmtCfg [friend] |
Entries OSB_LIB::GrpAccessMap::entries_ [private] |
Id<UserGroup> OSB_LIB::GrpAccessMap::grpId_ [private] |