mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
Redirect to two-factor auth page after creating the first admin
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -3124,6 +3124,7 @@ func TestWebAdminSetupWithInstallCode(t *testing.T) {
|
||||
r.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
server.router.ServeHTTP(rr, r)
|
||||
assert.Equal(t, http.StatusFound, rr.Code)
|
||||
assert.Equal(t, webAdminMFAPath, rr.Header().Get("Location"))
|
||||
|
||||
_, err = dataprovider.AdminExists(defaultAdminUsername)
|
||||
assert.NoError(t, err)
|
||||
@@ -3180,6 +3181,7 @@ func TestWebAdminSetupWithInstallCode(t *testing.T) {
|
||||
r.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||
server.router.ServeHTTP(rr, r)
|
||||
assert.Equal(t, http.StatusFound, rr.Code)
|
||||
assert.Equal(t, webAdminMFAPath, rr.Header().Get("Location"))
|
||||
|
||||
_, err = dataprovider.AdminExists(defaultAdminUsername)
|
||||
assert.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user