1
z8018
2025-08-26 3dc1554797ce21794a50be251e25ea0d840ff6d4
ÎÞ²Ö´¢²ã°æWCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Filter/CustomAuthorizeFilter.cs
@@ -10,11 +10,11 @@
            // ä½ çš„自定义授权逻辑
            // ä¾‹å¦‚,‌检查用户是否已登录,‌或者他们是否有特定的角色或权限
            if (!context.HttpContext.User.Identity.IsAuthenticated)
            {
                // ç”¨æˆ·æœªç™»å½•,‌重定向到登录页面或返回401状态码
                context.Result = new ChallengeResult();
            }
            //if (!context.HttpContext.User.Identity.IsAuthenticated)
            //{
            //    // ç”¨æˆ·æœªç™»å½•,‌重定向到登录页面或返回401状态码
            //    context.Result = new ChallengeResult();
            //}
        }
    }
}