This commit is contained in:
王炜翔 2025-02-19 21:22:24 +08:00
parent bb6e904258
commit 751ad5fd96

View File

@ -147,7 +147,7 @@ namespace asg_form.Controllers
[Authorize]
public async Task<ActionResult<object>> blackDel([FromQuery] string idFind)
{
if (!this.User.FindAll(ClaimTypes.Role).Any(a => a.Value == "admin") || !this.User.FindAll(ClaimTypes.Role).Any(a => a.Value == "admin"))
if (!this.User.FindAll(ClaimTypes.Role).Any(a => a.Value == "admin") && !this.User.FindAll(ClaimTypes.Role).Any(a => a.Value == "admin"))
{
return Ok(new error_mb { code = 401, message = "无权访问" });
}