Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 092b07d

Browse files
committedMar 31, 2022
Revert unnecessary change in packages api
1 parent c692c89 commit 092b07d

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed
 

‎routers/api/packages/api.go‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ import (
2828

2929
func reqPackageAccess(accessMode perm.AccessMode) func(ctx *context.Context) {
3030
return func(ctx *context.Context) {
31-
if !setting.Packages.Enabled {
32-
ctx.Error(http.StatusNotImplemented)
33-
return
34-
}
35-
3631
if ctx.Package.AccessMode < accessMode && !ctx.IsUserSiteAdmin() {
3732
ctx.Resp.Header().Set("WWW-Authenticate", `Basic realm="Gitea Package API"`)
3833
ctx.Error(http.StatusUnauthorized, "reqPackageAccess", "user should have specific permission or be a site admin")

0 commit comments

Comments
 (0)
Please sign in to comment.