1
0
Fork 0
forked from forgejo/forgejo

[GITEA] do not enforce misc scope tokens for public API endpoints

(cherry picked from commit e353d1c4b7)
This commit is contained in:
Loïc Dachary 2023-07-23 21:52:33 +02:00
parent f255e50903
commit 666f43fb64
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2
3 changed files with 13 additions and 32 deletions

View file

@ -141,26 +141,6 @@ func TestAPIDeniesPermissionBasedOnTokenScope(t *testing.T) {
},
},
},
{
"/api/v1/markdown",
"POST",
[]permission{
{
auth_model.AccessTokenScopeCategoryMisc,
auth_model.Write,
},
},
},
{
"/api/v1/markdown/raw",
"POST",
[]permission{
{
auth_model.AccessTokenScopeCategoryMisc,
auth_model.Write,
},
},
},
{
"/api/v1/notifications",
"GET",
@ -347,16 +327,6 @@ func TestAPIDeniesPermissionBasedOnTokenScope(t *testing.T) {
},
},
},
{
"/api/v1/settings/api",
"GET",
[]permission{
{
auth_model.AccessTokenScopeCategoryMisc,
auth_model.Read,
},
},
},
{
"/api/v1/user",
"GET",