implement mandatory 2fa

part of #716
This commit is contained in:
Girish Ramakrishnan
2020-07-10 10:43:08 -07:00
parent 779c3ba75b
commit fb07dc2294
5 changed files with 55 additions and 11 deletions

View File

@@ -57,6 +57,8 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
};
function init() {
console.log(window.location);
Client.getStatus(function (error, status) {
if (error) return Client.initError(error, init);
@@ -110,6 +112,11 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
$scope.initialized = true;
if (Client.getConfig().mandatory2FA && !Client.getUserInfo().twoFactorAuthenticationEnabled) {
$location.path('/profile').search({ setup2fa: true });
return;
}
refreshNotifications(true);
$scope.updateSubscriptionStatus();