aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-11-26 10:03:02 +0800
committerGitHub <noreply@github.com>2024-11-26 02:03:02 +0000
commit9ed768adc426636b6fbcdb389ba89ba039bc7da3 (patch)
treedbe6d747fbf1460cfbc3e3155cf2611a41e62caf /routers
parent25cacaf0aa56bece904c84638fbe126a826c1cd8 (diff)
downloadgitea-9ed768adc426636b6fbcdb389ba89ba039bc7da3.tar.gz
gitea-9ed768adc426636b6fbcdb389ba89ba039bc7da3.zip
Improve oauth2 scope token handling (#32633)
Diffstat (limited to 'routers')
-rw-r--r--routers/api/v1/api.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 0079e8dc87..aee76325a8 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -321,7 +321,7 @@ func tokenRequiresScopes(requiredScopeCategories ...auth_model.AccessTokenScopeC
}
if !allow {
- ctx.Error(http.StatusForbidden, "tokenRequiresScope", fmt.Sprintf("token does not have at least one of required scope(s): %v", requiredScopes))
+ ctx.Error(http.StatusForbidden, "tokenRequiresScope", fmt.Sprintf("token does not have at least one of required scope(s), required=%v, token scope=%v", requiredScopes, scope))
return
}