From f67262967c0fe8a2af6996dff052549134755d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=82=9C=E7=BF=94?= <2307953404@qq.com> Date: Mon, 14 Oct 2024 09:49:45 +0800 Subject: [PATCH] 1 --- asg_form/Controllers/InviteReferee.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asg_form/Controllers/InviteReferee.cs b/asg_form/Controllers/InviteReferee.cs index 6ff9207..8afafaa 100644 --- a/asg_form/Controllers/InviteReferee.cs +++ b/asg_form/Controllers/InviteReferee.cs @@ -67,7 +67,7 @@ namespace asg_form.Controllers string Invitorid = this.User.FindFirst(ClaimTypes.NameIdentifier)!.Value; var user = await userManager.FindByIdAsync(Invitorid); long userId = user.Id; - if (user.officium != "Commentator" || this.User.FindAll(ClaimTypes.Role).Any(a => a.Value == "nbadmin")) return Ok(new error_mb { code = 401, message = "您不是解说无法完成邀请" }); + if (user.officium != "Commentator" || !this.User.FindAll(ClaimTypes.Role).Any(a => a.Value == "nbadmin")) return Ok(new error_mb { code = 401, message = "您不是解说无法完成邀请" }); using (TestDbContext sb = new TestDbContext()) { try