diff --git a/routers/api/v1/org/member.go b/routers/api/v1/org/member.go index 267eda12a..e452683da 100644 --- a/routers/api/v1/org/member.go +++ b/routers/api/v1/org/member.go @@ -69,7 +69,7 @@ func ListMembers(ctx *context.APIContext) { ctx.Error(http.StatusInternalServerError, "IsOrgMember", err) return } - publicOnly = !isMember + publicOnly = !isMember && !ctx.User.IsAdmin } listMembers(ctx, publicOnly) } diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go index 1bf984b17..7b44a4787 100644 --- a/routers/api/v1/org/team.go +++ b/routers/api/v1/org/team.go @@ -320,7 +320,7 @@ func GetTeamMembers(ctx *context.APIContext) { if err != nil { ctx.Error(http.StatusInternalServerError, "IsOrganizationMember", err) return - } else if !isMember { + } else if !isMember && !ctx.User.IsAdmin { ctx.NotFound() return }