Skip to content

Commit

Permalink
Revert unnecessary change in packages api
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Mar 31, 2022
1 parent c692c89 commit 092b07d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions routers/api/packages/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ import (

func reqPackageAccess(accessMode perm.AccessMode) func(ctx *context.Context) {
return func(ctx *context.Context) {
if !setting.Packages.Enabled {
ctx.Error(http.StatusNotImplemented)
return
}

if ctx.Package.AccessMode < accessMode && !ctx.IsUserSiteAdmin() {
ctx.Resp.Header().Set("WWW-Authenticate", `Basic realm="Gitea Package API"`)
ctx.Error(http.StatusUnauthorized, "reqPackageAccess", "user should have specific permission or be a site admin")
Expand Down

0 comments on commit 092b07d

Please sign in to comment.