| 203 | } |
| 204 | |
| 205 | void CAuthManager::AddDefaultKey(const char *pRoleName, const char *pPw) |
| 206 | { |
| 207 | int Level = RoleNameToAuthLevel(pRoleName); |
| 208 | dbg_assert(AUTHED_HELPER <= Level && Level <= AUTHED_ADMIN, "default role with name '%s' not found.", pRoleName); |
| 209 | |
| 210 | static const char s_aaIdents[3][sizeof(HELPER_IDENT)] = {ADMIN_IDENT, MOD_IDENT, HELPER_IDENT}; |
| 211 | int Index = AUTHED_ADMIN - Level; |
| 212 | if(m_aDefault[Index] >= 0) |
| 213 | return; // already exists |
| 214 | m_aDefault[Index] = AddKey(s_aaIdents[Index], pPw, AuthLevelToRoleName(Level)); |
| 215 | } |
| 216 | |
| 217 | bool CAuthManager::IsGenerated() const |
| 218 | { |
no test coverage detected