From 48890ce5468f804a72e210e57e5b3800c9d34ffd Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 28 Mar 2020 19:45:55 +0000 Subject: Allow site admin to check /api/v1/orgs endpoints (#10867) Fix #9950 Signed-off-by: Andrew Thornton --- routers/api/v1/org/team.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers/api/v1/org/team.go') diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go index 1bf984b17f..7b44a47870 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 } -- cgit v1.2.3