MCPcopy Create free account
hub / github.com/baidu/tera / LoadUserMeta

Method LoadUserMeta

src/master/user_manager.cc:103–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void 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
115void UserManager::SetupRootUser() {
116 // there is no races, so there is no lock

Callers 2

LoadMetaTableMethod · 0.80
LoadMetaTableFromFileMethod · 0.80

Calls 1

ParseFromStringMethod · 0.45

Tested by

no test coverage detected