#include <TdkUserAccessPersistenceManager.h>
Static Public Member Functions | |
Access Control | |
static void | createAuthenticationTables (TeDatabase *db) |
static void | createAppAuthenticateTable (TeDatabase *db, TeTable authTable) |
static void | createAllRolesTable (TeDatabase *db, TeTable allRoleTable) |
static void | createRoleTable (TeDatabase *db) |
Creates an empty roles tables. | |
static void | createRoleTable (TeDatabase *db, TeTable newTable) |
Creates the roles tables and inserts records. | |
static void | defineAuthIntegrity (TeDatabase *db) |
Defines Relation authenticate table. | |
static TdkRoleVector | loadAppUserRoles (TeDatabase *db, std::string user) |
static TdkRoleVector | loadDefaultRoleList (TeDatabase *db) |
static TdkRoleVector | loadDefaultUserList (TeDatabase *db) |
static void | insertAppUser (TeDatabase *db, std::string user, std::string password) |
Inserts user/password in the authentication table. | |
static void | removeAppUser (TeDatabase *db, std::string user) |
Removes user/password from the authentication table. | |
static bool | authenticateAppRoles (TeDatabase *db, std::string user, std::string password) |
Updates the access control vector. | |
static bool | isAppAuthenticateOn (TeDatabase *db) |
static bool | findRole (TeDatabase *db, const std::string user, const std::string role) |
static bool | findRole (const std::string dbKey, const std::string user, const std::string role) |
static std::string | getAppRoleId (TeDatabase *db, std::string role) |
Gets the role ID. | |
static std::string | getAppUserId (TeDatabase *db, std::string user) |
Gets user ID. | |
static void | releaseAppRole (const std::string dbKey, std::string user) |
Clears all roles from memory. | |
static TdkAccessControlMap & | getAccessControlMap (const std::string dbKey) |
static void | insertAppRole (TeDatabase *db, std::string user, std::string role) |
Inserts a new role to the application roles table. | |
static void | removeAppRole (TeDatabase *db, std::string role) |
static void | associateAppRole (TeDatabase *db, std::string user, std::string role) |
Associates a role from a user. | |
static void | dissociateAppRole (TeDatabase *db, std::string user, std::string role_id) |
Dissociates a role from a user. | |
Static Private Attributes | |
Access Control | |
static TdkAccessControlMap | currentDBAuthRoleMap_ |
static bool | authenticateOn_ = false |
void TdkUserAccessPersistenceManager::createAuthenticationTables | ( | TeDatabase * | db | ) | [static] |
void TdkUserAccessPersistenceManager::createAppAuthenticateTable | ( | TeDatabase * | db, | |
TeTable | authTable | |||
) | [static] |
void TdkUserAccessPersistenceManager::createAllRolesTable | ( | TeDatabase * | db, | |
TeTable | allRoleTable | |||
) | [static] |
void TdkUserAccessPersistenceManager::createRoleTable | ( | TeDatabase * | db | ) | [static] |
Creates an empty roles tables.
void TdkUserAccessPersistenceManager::createRoleTable | ( | TeDatabase * | db, | |
TeTable | newTable | |||
) | [static] |
Creates the roles tables and inserts records.
void TdkUserAccessPersistenceManager::defineAuthIntegrity | ( | TeDatabase * | db | ) | [static] |
Defines Relation authenticate table.
static TdkRoleVector TdkUserAccessPersistenceManager::loadAppUserRoles | ( | TeDatabase * | db, | |
std::string | user | |||
) | [static] |
TdkRoleVector TdkUserAccessPersistenceManager::loadDefaultRoleList | ( | TeDatabase * | db | ) | [static] |
TdkRoleVector TdkUserAccessPersistenceManager::loadDefaultUserList | ( | TeDatabase * | db | ) | [static] |
static void TdkUserAccessPersistenceManager::insertAppUser | ( | TeDatabase * | db, | |
std::string | user, | |||
std::string | password | |||
) | [static] |
Inserts user/password in the authentication table.
static void TdkUserAccessPersistenceManager::removeAppUser | ( | TeDatabase * | db, | |
std::string | user | |||
) | [static] |
Removes user/password from the authentication table.
static bool TdkUserAccessPersistenceManager::authenticateAppRoles | ( | TeDatabase * | db, | |
std::string | user, | |||
std::string | password | |||
) | [static] |
Updates the access control vector.
bool TdkUserAccessPersistenceManager::isAppAuthenticateOn | ( | TeDatabase * | db | ) | [static] |
bool TdkUserAccessPersistenceManager::findRole | ( | TeDatabase * | db, | |
const std::string | user, | |||
const std::string | role | |||
) | [static] |
bool TdkUserAccessPersistenceManager::findRole | ( | const std::string | dbKey, | |
const std::string | user, | |||
const std::string | role | |||
) | [static] |
std::string TdkUserAccessPersistenceManager::getAppRoleId | ( | TeDatabase * | db, | |
std::string | role | |||
) | [static] |
Gets the role ID.
std::string TdkUserAccessPersistenceManager::getAppUserId | ( | TeDatabase * | db, | |
std::string | user | |||
) | [static] |
Gets user ID.
void TdkUserAccessPersistenceManager::releaseAppRole | ( | const std::string | dbKey, | |
std::string | user | |||
) | [static] |
Clears all roles from memory.
static TdkAccessControlMap& TdkUserAccessPersistenceManager::getAccessControlMap | ( | const std::string | dbKey | ) | [static] |
void TdkUserAccessPersistenceManager::insertAppRole | ( | TeDatabase * | db, | |
std::string | user, | |||
std::string | role | |||
) | [static] |
Inserts a new role to the application roles table.
static void TdkUserAccessPersistenceManager::removeAppRole | ( | TeDatabase * | db, | |
std::string | role | |||
) | [static] |
void TdkUserAccessPersistenceManager::associateAppRole | ( | TeDatabase * | db, | |
std::string | user, | |||
std::string | role | |||
) | [static] |
Associates a role from a user.
void TdkUserAccessPersistenceManager::dissociateAppRole | ( | TeDatabase * | db, | |
std::string | user, | |||
std::string | role_id | |||
) | [static] |
Dissociates a role from a user.
TdkAccessControlMap TdkUserAccessPersistenceManager::currentDBAuthRoleMap_ [static, private] |
bool TdkUserAccessPersistenceManager::authenticateOn_ = false [static, private] |