Skip to content

Commit

Permalink
admin should be able to delete repos even if he is not a member of th…
Browse files Browse the repository at this point in the history
…e organization (go-gitea#5443)
  • Loading branch information
adelowo committed Dec 2, 2018
1 parent 7bc1faa commit f1cf75e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/api/v1/repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ func Delete(ctx *context.APIContext) {
owner := ctx.Repo.Owner
repo := ctx.Repo.Repository

if owner.IsOrganization() {
if owner.IsOrganization() && !ctx.User.IsAdmin {
isOwner, err := owner.IsOwnedBy(ctx.User.ID)
if err != nil {
ctx.Error(500, "IsOwnedBy", err)
Expand Down

0 comments on commit f1cf75e

Please sign in to comment.