Ensure notifications are only fetched and shown for at least admins

This commit is contained in:
Johannes Zellner
2021-07-07 19:07:43 +02:00
parent 2cb698c6bd
commit 9bbd1af259
3 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -3,7 +3,9 @@
/* global async */
/* global angular */
angular.module('Application').controller('NotificationsController', ['$scope', '$timeout', '$translate', '$interval', 'Client', function ($scope, $timeout, $translate, $interval, Client) {
angular.module('Application').controller('NotificationsController', ['$scope', '$location', '$timeout', '$translate', '$interval', 'Client', function ($scope, $location, $timeout, $translate, $interval, Client) {
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastAdmin) $location.path('/'); });
$scope.clearAllBusy = false;
$scope.notifications = [];