
It represents the users of the OSB system. It also performs user management functions like user creation, user deletion, and user modification.
Definition at line 79 of file osbuser.h.
| typedef std::map< ModuleId, Id<UserGroup> > OSB_LIB::OsbUser::Grants |
| typedef Id<OsbUser> OSB_LIB::OsbUser::Oid |
| OSB_LIB::OsbUser::OsbUser | ( | const std::string & | login, | |
| const std::string & | password = "" | |||
| ) | [explicit] |
Constructor with login name and optional password.
| login | OSB user login name. | |
| password | OSB user password. |
| OsbException | if login is empty. | |
| OsbException | if login or password is too long. |
| bool OSB_LIB::OsbUser::checkPw | ( | const std::string & | password | ) | [private] |
Validate the password.
| password | Current password of the user. |
| ModuleId OSB_LIB::OsbUser::defModule | ( | ) | const [inline] |
The default module of the user.
Definition at line 121 of file osbuser.h.
References defModule_.
| const std::string& OSB_LIB::OsbUser::email | ( | ) | const [inline] |
| void OSB_LIB::OsbUser::grant | ( | const UserGroup & | grp | ) |
Grant the module and access rights of user group.
| grp | The user group to add. It replaces an existing group for the same module. |
| const Grants& OSB_LIB::OsbUser::grants | ( | ) | const |
List of modules and related user group available for the user.
| void OSB_LIB::OsbUser::insert | ( | const OSB_DB::Session & | session | ) | [private] |
Insert the OSB user object into the database.
Insert the OSB user into the database. On success, the function sets oid_.
| session | Database session to use. |
| OsbException |
|
| bool OSB_LIB::OsbUser::login | ( | const OSB_DB::Session & | session | ) | [private] |
Validate the user's credentials.
| session | Database session to use. |
| const std::string& OSB_LIB::OsbUser::loginName | ( | ) | const [inline] |
| const std::string& OSB_LIB::OsbUser::name | ( | ) | const [inline] |
| const long OSB_LIB::OsbUser::objVs | ( | ) | const [inline] |
| const Oid& OSB_LIB::OsbUser::oid | ( | ) | const [inline] |
| const std::string& OSB_LIB::OsbUser::password | ( | ) | const [inline] |
| void OSB_LIB::OsbUser::read | ( | const OSB_DB::Session & | session | ) | [private] |
Read OSB user from the database.
| session | Database session to use. |
| ObjectNotFound | if the user does not exist in the database. |
| void OSB_LIB::OsbUser::remove | ( | const OSB_DB::Session & | session | ) | [private] |
Remove the OSB user object from the database.
| session | Database session to use. |
| OsbException |
|
| void OSB_LIB::OsbUser::revoke | ( | const ModuleId | module | ) |
Revoke the access rights for a module.
| module | OSB module to remove from the user. |
| void OSB_LIB::OsbUser::revokeAll | ( | ) |
Revoke all access rights.
Removes all grants and clears defModule().
| bool OSB_LIB::OsbUser::setDefModule | ( | const ModuleId | module | ) |
Set the default module for the user.
| module | New default OSB module. |
| void OSB_LIB::OsbUser::setEmail | ( | const std::string & | ) |
Set the user name.
| The new e-mail address for the user. |
| OsbException | if email is too long. |
| void OSB_LIB::OsbUser::setLoginName | ( | const std::string & | loginName | ) |
Set the login name.
| loginName | The new login name for the user, it must be unique (checked during insert() or update()). |
| OsbException | if loginName is empty or too long. |
| void OSB_LIB::OsbUser::setName | ( | const std::string & | name | ) |
Set the user name.
| name | The new name for the user. |
| OsbException | if name is too long. |
| void OSB_LIB::OsbUser::setPassword | ( | const std::string & | newPw, | |
| const std::string & | oldPw | |||
| ) |
Set the password.
| newPw | The new password of the user. | |
| oldPw | The old password of the user, if empty it is not validated. |
| OsbException | if the old password is not correct. |
| void OSB_LIB::OsbUser::setPw | ( | const std::string & | pw | ) | [private] |
Set the user's password.
| void OSB_LIB::OsbUser::update | ( | const OSB_DB::Session & | session | ) | [private] |
Update the OSB user object in the database.
| session | Database session to use. |
| OsbException |
|
Check if a OSB module is available and get user group.
| module | The module to query. |
friend class OSB_DB::OsbUserGw [friend] |
friend class UserMgmtCfg [friend] |
ModuleId OSB_LIB::OsbUser::defModule_ [private] |
std::string OSB_LIB::OsbUser::email_ [private] |
Grants OSB_LIB::OsbUser::grants_ [private] |
std::string OSB_LIB::OsbUser::loginName_ [private] |
std::string OSB_LIB::OsbUser::name_ [private] |
long OSB_LIB::OsbUser::objVs_ [private] |
Oid OSB_LIB::OsbUser::oid_ [private] |
std::string OSB_LIB::OsbUser::password_ [private] |
Password of OSB user: it is always encrypted.
Definition at line 303 of file osbuser.h.
Referenced by password().
1.4.7