Remove the email subscription requirement
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
/* global asyncForEach:false */
|
||||
|
||||
angular.module('Application').controller('EmailController', ['$scope', '$location', '$timeout', '$rootScope', 'Client', 'AppStore', function ($scope, $location, $timeout, $rootScope, Client, AppStore) {
|
||||
angular.module('Application').controller('EmailController', ['$scope', '$location', '$timeout', '$rootScope', 'Client', function ($scope, $location, $timeout, $rootScope, Client) {
|
||||
Client.onReady(function () { if (!Client.hasScope('mail')) $location.path('/'); });
|
||||
|
||||
$scope.ready = false;
|
||||
@@ -10,7 +10,6 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
$scope.client = Client;
|
||||
$scope.user = Client.getUserInfo();
|
||||
$scope.config = Client.getConfig();
|
||||
$scope.hasSubscription = false;
|
||||
$scope.domains = [];
|
||||
$scope.users = [];
|
||||
$scope.selectedDomain = null;
|
||||
@@ -196,18 +195,7 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
|
||||
if ($scope.selectedDomain.mailConfig.enabled) {
|
||||
$('#disableEmailModal').modal('show');
|
||||
} else {
|
||||
Client.getAppstoreConfig(function (error, appstoreConfig) {
|
||||
if (error) return console.error(error);
|
||||
if (!appstoreConfig.token) return;
|
||||
|
||||
AppStore.getSubscription(appstoreConfig, function (error, result) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$scope.hasSubscription = result.plan.id !== 'free';
|
||||
|
||||
$('#enableEmailModal').modal('show');
|
||||
});
|
||||
});
|
||||
$('#enableEmailModal').modal('show');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user