1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Merge pull request #2069 from nanoant/patch/admin-see-all-organizations

Admin should be able to see all organizations
This commit is contained in:
Unknwon
2015-11-30 21:18:33 -05:00
3 changed files with 11 additions and 5 deletions

View File

@@ -316,7 +316,7 @@ func showOrgProfile(ctx *middleware.Context) {
org := ctx.Org.Organization
ctx.Data["Title"] = org.FullName
repos, err := models.GetRepositories(org.Id, ctx.IsSigned && org.IsOrgMember(ctx.User.Id))
repos, err := models.GetRepositories(org.Id, ctx.IsSigned && (ctx.User.IsAdmin || org.IsOrgMember(ctx.User.Id)))
if err != nil {
ctx.Handle(500, "GetRepositories", err)
return