summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/org/team.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-03-28 19:45:55 +0000
committerGitHub <noreply@github.com>2020-03-28 19:45:55 +0000
commit48890ce5468f804a72e210e57e5b3800c9d34ffd (patch)
treec8500d3af6acb80fb54095ebaec3870b0dd93f3f /routers/api/v1/org/team.go
parent052bff0cff30f43ddd656bccc36b29bce3866393 (diff)
downloadgitea-48890ce5468f804a72e210e57e5b3800c9d34ffd.tar.gz
gitea-48890ce5468f804a72e210e57e5b3800c9d34ffd.zip
Allow site admin to check /api/v1/orgs endpoints (#10867)
Fix #9950 Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'routers/api/v1/org/team.go')
-rw-r--r--routers/api/v1/org/team.go2
1 files changed, 1 insertions, 1 deletions
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
}