mirror of https://github.com/go-gitea/gitea.git
Fix org members bug (#20489)
* Fix bug in public only org members list
bug was introduced in d6779c7ad3
* Expanded org unit test
pull/20492/head
parent
a701fd35cf
commit
5ed082b624
|
@ -116,6 +116,24 @@ func TestPrivateOrg(t *testing.T) {
|
||||||
session.MakeRequest(t, req, http.StatusOK)
|
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) {
|
func TestOrgRestrictedUser(t *testing.T) {
|
||||||
defer prepareTestEnv(t)()
|
defer prepareTestEnv(t)()
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{if not .PublicOnly}}
|
{{if not $.PublicOnly}}
|
||||||
<div class="ui three wide column center">
|
<div class="ui three wide column center">
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
{{$.locale.Tr "org.members.member_role"}}
|
{{$.locale.Tr "org.members.member_role"}}
|
||||||
|
|
Loading…
Reference in New Issue