For performance to search an access right, the class contains redundant data (tag(), parentId()) that could be derived from ModAccess.
The class itself is not protected against concurrent access:
This is done by UserMgmtCfg which uses the UserGroup to verify that the access data are up-to-date.
Definition at line 309 of file osbaccess.h.
typedef Id<UserGroup> OSB_LIB::GrpAccess::GrpId |
typedef Id<ModAccess> OSB_LIB::GrpAccess::MaId |
typedef Id<GrpAccess> OSB_LIB::GrpAccess::Oid |
Default constructor with optional object id.
Constructor with user group and optional parent.
grpId | The id of the user group to which the access belongs to. | |
parent | The parent of the access right, not set for the user group's root access. |
const GrpId& OSB_LIB::GrpAccess::grpId | ( | ) | const |
User group of the access right.
const MaId& OSB_LIB::GrpAccess::maId | ( | ) | const |
Underlying module access right.
const Oid& OSB_LIB::GrpAccess::oid | ( | ) | const |
Object id.
const Oid& OSB_LIB::GrpAccess::parentId | ( | ) | const |
Parent of the access right.
void OSB_LIB::GrpAccess::read | ( | const OSB_DB::Session & | session | ) |
Read the access right from the database.
session | Database session to use. |
OsbException | if the access right as identified by oid() does not exist. |
void OSB_LIB::GrpAccess::remove | ( | const OSB_DB::Session & | session | ) | [private] |
Remove the access right from the database.
session | Database session to use. |
OsbException | if no row was removed. |
void OSB_LIB::GrpAccess::save | ( | const OSB_DB::Session & | session | ) | [private] |
Save the access right to the database.
session | Database session to use. |
OsbException | if maId() is not set, i.e., setModAccess() was never called. | |
OsbException | if the insert fails. |
void OSB_LIB::GrpAccess::setModAccess | ( | const ModAccess & | modAccess | ) |
Set the underlying module access.
const std::string& OSB_LIB::GrpAccess::tag | ( | ) | const |
The access identifier.
friend class OSB_DB::GrpAccessGw [friend] |
friend class UserMgmtCfg [friend] |
GrpId OSB_LIB::GrpAccess::grpId_ [private] |
MaId OSB_LIB::GrpAccess::maId_ [private] |
Oid OSB_LIB::GrpAccess::oid_ [private] |
Oid OSB_LIB::GrpAccess::parent_ [private] |
std::string OSB_LIB::GrpAccess::tag_ [private] |
The access right identifier.
For performance reasons this is redundant from the underlying module acess right.
Definition at line 412 of file osbaccess.h.