add mail manager role

part of cloudron/box#807
This commit is contained in:
Girish Ramakrishnan
2021-12-02 09:29:33 -08:00
parent 141d9fe4a6
commit 2c5b3d2c07
5 changed files with 17 additions and 10 deletions

View File

@@ -3,7 +3,7 @@
/* global $, angular, TASK_TYPES */
angular.module('Application').controller('EmailsController', ['$scope', '$location', '$translate', '$timeout', 'Client', function ($scope, $location, $translate, $timeout, Client) {
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastAdmin) $location.path('/'); });
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastMailManager) $location.path('/'); });
$scope.ready = false;
$scope.config = Client.getConfig();
@@ -409,11 +409,13 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati
$scope.domains = domains;
$scope.ready = true;
$scope.mailLocation.refresh();
$scope.maxEmailSize.refresh();
$scope.spamConfig.refresh();
$scope.solrConfig.refresh();
$scope.acl.refresh();
if ($scope.user.isAtLeastOwner) {
$scope.mailLocation.refresh();
$scope.maxEmailSize.refresh();
$scope.spamConfig.refresh();
$scope.solrConfig.refresh();
$scope.acl.refresh();
}
refreshDomainStatuses();
});