Fix bug in uploadFile()'s URL.

This commit is contained in:
Yang Luo
2022-07-17 14:29:06 +08:00
parent a0a762aa6f
commit 8c7f235ee1
3 changed files with 6 additions and 0 deletions

View File

@ -122,6 +122,10 @@ func AuthzFilter(ctx *context.Context) {
urlPath := getUrlPath(ctx.Request.URL.Path)
objOwner, objName := getObject(ctx)
if strings.HasPrefix(urlPath, "/api/notify-payment") {
urlPath = "/api/notify-payment"
}
isAllowed := authz.IsAllowed(subOwner, subName, method, urlPath, objOwner, objName)
result := "deny"