mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 14:07:55 +01:00
Fixes #3: Race condition on settings screen
This commit is contained in:
parent
9ae8303b18
commit
6edae27d26
@ -3,7 +3,9 @@
|
|||||||
/**
|
/**
|
||||||
* Settings controller.
|
* Settings controller.
|
||||||
*/
|
*/
|
||||||
angular.module('docs').controller('Settings', function($scope, Restangular) {
|
angular.module('docs').controller('Settings', function($scope, User) {
|
||||||
// Flag if the user is admin
|
// Flag if the user is admin
|
||||||
$scope.isAdmin = $scope.userInfo.base_functions.indexOf('ADMIN') != -1;
|
User.userInfo().then(function(data) {
|
||||||
|
$scope.isAdmin = data.base_functions.indexOf('ADMIN') != -1;
|
||||||
|
})
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user