feat: 完成源晶权限与经验系统并优化 me/admin 交互
这个提交包含在:
@@ -20,4 +20,14 @@ TEST_CASE("auth register/login/verify") {
|
||||
const auto r2 = auth.Login("alice", "password123");
|
||||
REQUIRE(r2.user_id == r.user_id);
|
||||
REQUIRE(r2.token != r.token);
|
||||
|
||||
const auto verified = auth.VerifyCredentials("alice", "password123");
|
||||
REQUIRE(verified.has_value());
|
||||
REQUIRE(verified.value() == r.user_id);
|
||||
|
||||
const auto wrong_password = auth.VerifyCredentials("alice", "wrongpass");
|
||||
REQUIRE_FALSE(wrong_password.has_value());
|
||||
|
||||
const auto wrong_user = auth.VerifyCredentials("missing_user", "password123");
|
||||
REQUIRE_FALSE(wrong_user.has_value());
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户