| 101 | } |
| 102 | |
| 103 | void UserManager::LoadUserMeta(const std::string& key, const std::string& value) { |
| 104 | if (key.length() <= 1 || key[0] != '~') { |
| 105 | LOG(ERROR) << "[user-manager] invalid argument"; |
| 106 | return; |
| 107 | } |
| 108 | std::string user_name = key.substr(1); |
| 109 | |
| 110 | UserInfo user_info; |
| 111 | user_info.ParseFromString(value); |
| 112 | AddUser(user_name, user_info); |
| 113 | } |
| 114 | |
| 115 | void UserManager::SetupRootUser() { |
| 116 | // there is no races, so there is no lock |
no test coverage detected