fix: 修复权限判断逻辑(应为 &&,避免始终抛出权限异常)

修正 AiAccountService.GetProfitStatisticsAsync 中的条件判断,原先使用 || 导致即使为 Guo 或 cc 仍被拒绝访问。
This commit is contained in:
chenchun
2025-10-30 14:48:53 +08:00
parent 933cbb91d8
commit 5beef22269

View File

@@ -85,7 +85,7 @@ public class AiAccountService : ApplicationService
[HttpGet("account/profit-statistics")]
public async Task<string> GetProfitStatisticsAsync([FromQuery] decimal currentCost)
{
if (CurrentUser.UserName != "Guo" || CurrentUser.UserName != "cc")
if (CurrentUser.UserName != "Guo" && CurrentUser.UserName != "cc")
{
throw new UserFriendlyException("您暂无权限访问");
}