Use the scope to determine what the user has access to

This commit is contained in:
Girish Ramakrishnan
2018-05-01 11:44:47 -07:00
parent d9ec1be9b6
commit 72bbb4ec68
10 changed files with 23 additions and 8 deletions

View File

@@ -3,7 +3,7 @@
/* global asyncForEach:false */
angular.module('Application').controller('EmailController', ['$scope', '$location', '$timeout', '$rootScope', 'Client', 'AppStore', function ($scope, $location, $timeout, $rootScope, Client, AppStore) {
Client.onReady(function () { if (!Client.getUserInfo().admin) $location.path('/'); });
Client.onReady(function () { if (!Client.hasScope('mail')) $location.path('/'); });
$scope.ready = false;
$scope.refreshBusy = true;