diff --git a/integrations/org_test.go b/integrations/org_test.go index d755385726a..d787e6f7910 100644 --- a/integrations/org_test.go +++ b/integrations/org_test.go @@ -116,6 +116,24 @@ func TestPrivateOrg(t *testing.T) { session.MakeRequest(t, req, http.StatusOK) } +func TestOrgMembers(t *testing.T) { + defer prepareTestEnv(t)() + + // not logged in user + req := NewRequest(t, "GET", "/org/org25/members") + MakeRequest(t, req, http.StatusOK) + + // org member + session := loginUser(t, "user24") + req = NewRequest(t, "GET", "/org/org25/members") + session.MakeRequest(t, req, http.StatusOK) + + // site admin + session = loginUser(t, "user1") + req = NewRequest(t, "GET", "/org/org25/members") + session.MakeRequest(t, req, http.StatusOK) +} + func TestOrgRestrictedUser(t *testing.T) { defer prepareTestEnv(t)() diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl index 9a2c235aa6b..b558dbe5ee0 100644 --- a/templates/org/member/members.tmpl +++ b/templates/org/member/members.tmpl @@ -29,7 +29,7 @@ {{end}} - {{if not .PublicOnly}} + {{if not $.PublicOnly}}