Use the scope to determine what the user has access to
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
/* global asyncForEach:false */
|
||||
|
||||
angular.module('Application').controller('UsersController', ['$scope', '$location', '$timeout', 'Client', function ($scope, $location, $timeout, Client) {
|
||||
Client.onReady(function () { if (!Client.getUserInfo().admin) $location.path('/'); });
|
||||
Client.onReady(function () { if (!Client.hasScope('users')) $location.path('/'); });
|
||||
|
||||
$scope.ready = false;
|
||||
$scope.users = [];
|
||||
|
||||
Reference in New Issue
Block a user