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

Method IsValidForCreate

src/master/user_manager.cc:129–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129bool UserManager::IsValidForCreate(const std::string& token, const std::string& user_name) {
130 LOG(INFO) << "[user-manager] " << user_name << ", " << token;
131 return IsValidUserName(user_name) && !IsUserExist(user_name) && TokenToUserName(token) == "root";
132}
133
134bool UserManager::IsValidForDelete(const std::string& token, const std::string& user_name) {
135 LOG(INFO) << "[user-manager] " << user_name << ", " << token;

Callers 1

OperateUserMethod · 0.80

Calls 1

IsValidUserNameFunction · 0.85

Tested by

no test coverage detected