summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index d60ec68834..d4af0babc0 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -57,7 +57,7 @@ func checkContextUser(ctx *middleware.Context, uid int64) *models.User {
}
// Check ownership of organization.
- if !org.IsOrganization() || !org.IsOwnedBy(ctx.User.Id) {
+ if !org.IsOrganization() || !(ctx.User.IsAdmin || org.IsOwnedBy(ctx.User.Id)) {
ctx.Error(403)
return nil
}