dotnetcore / dotnetcore/WTM

权限验证时不支持Async结尾的方法名

Open
#578 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
4.3k
Forks
896
PR merge metrics
No merged PRs in 30d

Description

```csharp
menus.Where(x => x.Url != null && x.Url.ToLower() == url).FirstOrDefault();
```
在验证权限时,对URL和菜单中的MethodName进行比对时,当Controller的Action是以Async结尾的方法时,URL中不包含Async,会出现无法匹配权限的情况
![图片](https://user-images.githubusercontent.com/41775850/184837140-44dcfb84-ee4a-4619-9ae6-62e112e3e191.png)
上图中的URL为~/[Controller]/DoReview,无法正确的匹配权限

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.