From b68e12b52a9dd97e737479ea251f916b396ea2ed Mon Sep 17 00:00:00 2001 From: kunw Date: Wed, 27 Jul 2016 23:18:24 +0800 Subject: [PATCH] fixed toggling admin user option. --- static/resources/js/components/user/toggle-admin.directive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/resources/js/components/user/toggle-admin.directive.js b/static/resources/js/components/user/toggle-admin.directive.js index f4eb5e5b7..ec768cd89 100644 --- a/static/resources/js/components/user/toggle-admin.directive.js +++ b/static/resources/js/components/user/toggle-admin.directive.js @@ -25,7 +25,7 @@ function ToggleAdminController($scope, ToggleAdminService, $filter, trFilter) { var vm = this; - vm.isAdmin = (vm.hasAdminRole === 1) ? true : false; + vm.isAdmin = (Number(vm.hasAdminRole) === 1) ? true : false; vm.enabled = vm.isAdmin ? 0 : 1; vm.toggle = toggle;