diff --git a/src/client/etcd_state_client.cpp b/src/client/etcd_state_client.cpp index d4d35009..36d0f916 100644 --- a/src/client/etcd_state_client.cpp +++ b/src/client/etcd_state_client.cpp @@ -1423,9 +1423,7 @@ void etcd_state_client_t::parse_state(const etcd_kv_t & kv) inf = std::make_shared(); inf->name = name; } - inf->type = value["type"] == "admin" ? user_type_t::ADMIN : - (value["type"] == "mon" ? user_type_t::MON : - (value["type"] == "osd" ? user_type_t::OSD : user_type_t::CLIENT)); + inf->type = value["type"] == "admin" ? user_type_t::ADMIN : user_type_t::CLIENT; inf->groups.clear(); for (auto & group: value["groups"].array_items()) { diff --git a/src/client/etcd_state_client.h b/src/client/etcd_state_client.h index 288670a6..94bd086c 100644 --- a/src/client/etcd_state_client.h +++ b/src/client/etcd_state_client.h @@ -115,8 +115,6 @@ enum class user_type_t { CLIENT = 0, ADMIN = 1, - MON = 2, - OSD = 3, }; struct user_perm_t diff --git a/src/cmd/cli_modify_user.cpp b/src/cmd/cli_modify_user.cpp index 64e8e7a7..9eccd4ed 100644 --- a/src/cmd/cli_modify_user.cpp +++ b/src/cmd/cli_modify_user.cpp @@ -31,7 +31,7 @@ struct cli_modify_user_t goto resume_1; else if (state == 2) goto resume_2; - if (user_type != "client" && user_type != "admin" && user_type != "mon" && user_type != "osd") + if (user_type != "client" && user_type != "admin") { result = (cli_result_t){ .err = EINVAL, .text = "Unknown user type: "+user_type }; state = 100; diff --git a/src/cmd/openapi.json b/src/cmd/openapi.json index 9bd1f40c..81538640 100644 --- a/src/cmd/openapi.json +++ b/src/cmd/openapi.json @@ -946,7 +946,7 @@ "type": "object", "properties": { "name": { "type": "string", "description": "User name" }, - "type": { "type": "string", "enum": [ "osd", "mon", "admin", "client" ], "description": "User type" }, + "type": { "type": "string", "enum": [ "admin", "client" ], "description": "User type" }, "groups": { "type": "array", "items": { "type": "string" }, "description": "User group names" } } },