seafile: fix error when not configured for 2fa (#5665)

This commit is contained in:
Fred
2021-10-19 20:53:35 +01:00
committed by GitHub
parent eb0c8284f1
commit b085aa1a3f
2 changed files with 13 additions and 7 deletions
+2 -1
View File
@@ -310,7 +310,8 @@ func Config(ctx context.Context, name string, m configmap.Mapper, config fs.Conf
is2faEnabled, _ := m.Get(config2FA)
if is2faEnabled != "true" {
return nil, errors.New("two-factor authentication is not enabled on this account")
// no need to do anything here
return nil, nil
}
username, _ := m.Get(configUser)