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

@@ -5,7 +5,9 @@
/* global async */
angular.module('Application').controller('EmailController', ['$scope', '$location', '$translate', '$timeout', '$route', '$routeParams', 'Client', function ($scope, $location, $translate, $timeout, $route, $routeParams, Client) {
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastAdmin) $location.path('/'); });
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastMailManager) $location.path('/'); });
$scope.user = Client.getUserInfo();
// Avoid full reload on path change
// https://stackoverflow.com/a/22614334