aboutsummaryrefslogtreecommitdiffstats
path: root/models/user_test.go
diff options
context:
space:
mode:
authorKamil DomaƄski <kamil@domanski.co>2021-11-08 23:47:19 +0100
committerGitHub <noreply@github.com>2021-11-08 23:47:19 +0100
commit021df29623bb0155b5a2ccad0e5f90fb348c8f4e (patch)
treec720bc34bd29620028c51d35c6d98044af89101e /models/user_test.go
parenta3f9e9234cbb099b821a6ea9c575927be18948de (diff)
downloadgitea-021df29623bb0155b5a2ccad0e5f90fb348c8f4e.tar.gz
gitea-021df29623bb0155b5a2ccad0e5f90fb348c8f4e.zip
Allow U2F 2FA without TOTP (#11573)
This change enables the usage of U2F without being forced to enroll an TOTP authenticator. The `/user/auth/u2f` has been changed to hide the "use TOTP instead" bar if TOTP is not enrolled. Fixes #5410 Fixes #17495
Diffstat (limited to 'models/user_test.go')
-rw-r--r--models/user_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/user_test.go b/models/user_test.go
index 2dcca20346..3f3536dafa 100644
--- a/models/user_test.go
+++ b/models/user_test.go
@@ -147,13 +147,13 @@ func TestSearchUsers(t *testing.T) {
}
testUserSuccess(&SearchUserOptions{OrderBy: "id ASC", ListOptions: db.ListOptions{Page: 1}},
- []int64{1, 2, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 24, 27, 28, 29, 30})
+ []int64{1, 2, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 24, 27, 28, 29, 30, 32})
testUserSuccess(&SearchUserOptions{ListOptions: db.ListOptions{Page: 1}, IsActive: util.OptionalBoolFalse},
[]int64{9})
testUserSuccess(&SearchUserOptions{OrderBy: "id ASC", ListOptions: db.ListOptions{Page: 1}, IsActive: util.OptionalBoolTrue},
- []int64{1, 2, 4, 5, 8, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 24, 28, 29, 30})
+ []int64{1, 2, 4, 5, 8, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 24, 28, 29, 30, 32})
testUserSuccess(&SearchUserOptions{Keyword: "user1", OrderBy: "id ASC", ListOptions: db.ListOptions{Page: 1}, IsActive: util.OptionalBoolTrue},
[]int64{1, 10, 11, 12, 13, 14, 15, 16, 18})