Fix prohibit login check on authorization (#6106)

* fix bug prohibit login not applied on dashboard

* fix tests

* fix bug user status leak

* fix typo

* return after render
This commit is contained in:
Lunny Xiao 2019-02-19 15:19:28 +08:00 committed by Lauris BH
parent 538a26d56f
commit f5fa22a499
7 changed files with 83 additions and 9 deletions

View file

@ -112,7 +112,7 @@ func TestCreateReleasePaging(t *testing.T) {
checkLatestReleaseAndCount(t, session, "/user2/repo1", "v0.0.12", i18n.Tr("en", "repo.release.draft"), 10)
// Check that user3 does not see draft and still see 10 latest releases
session2 := loginUser(t, "user3")
// Check that user4 does not see draft and still see 10 latest releases
session2 := loginUser(t, "user4")
checkLatestReleaseAndCount(t, session2, "/user2/repo1", "v0.0.11", i18n.Tr("en", "repo.release.stable"), 10)
}