Commit c1275e2b authored by Lanre Adelowo's avatar Lanre Adelowo Committed by Lauris BH
Browse files

Admin should be able to delete repos even if he is not a member of the organization (#5443) (#5447)

parent 7bc1faab
Showing with 1 addition and 1 deletion
+1 -1
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment