aboutsummaryrefslogtreecommitdiffstats
path: root/models/fixtures
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/fixtures
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/fixtures')
-rw-r--r--models/fixtures/u2f_registration.yml2
-rw-r--r--models/fixtures/user.yml16
2 files changed, 17 insertions, 1 deletions
diff --git a/models/fixtures/u2f_registration.yml b/models/fixtures/u2f_registration.yml
index 4a9d1d9624..60555c43f1 100644
--- a/models/fixtures/u2f_registration.yml
+++ b/models/fixtures/u2f_registration.yml
@@ -1,7 +1,7 @@
-
id: 1
name: "U2F Key"
- user_id: 1
+ user_id: 32
counter: 0
created_unix: 946684800
updated_unix: 946684800
diff --git a/models/fixtures/user.yml b/models/fixtures/user.yml
index c49fe1b656..cf07542eed 100644
--- a/models/fixtures/user.yml
+++ b/models/fixtures/user.yml
@@ -542,3 +542,19 @@
avatar_email: user31@example.com
num_repos: 0
is_active: true
+
+-
+ id: 32
+ lower_name: user32
+ name: user32
+ full_name: User 32 (U2F test)
+ email: user32@example.com
+ passwd: 7d93daa0d1e6f2305cc8fa496847d61dc7320bb16262f9c55dd753480207234cdd96a93194e408341971742f4701772a025a # password
+ type: 0 # individual
+ salt: ZogKvWdyEx
+ is_admin: false
+ is_restricted: false
+ avatar: avatar32
+ avatar_email: user30@example.com
+ num_repos: 0
+ is_active: true