Merge pull request #2069 from nanoant/patch/admin-see-all-organizations
Admin should be able to see all organizations
This commit is contained in:
commit
117afe7620
3 changed files with 11 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue