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
commit 117afe7620
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