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 (#5443) (#5447)
  • Loading branch information
adelowo authored and lafriks committed Dec 2, 2018
1 parent 7bc1faa commit c1275e2
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 c1275e2

Please sign in to comment.