mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 00:57:44 +01:00
Fixed toggling admin user option. (#597)
* fixed toggling admin user option. * refine comparsion expression
This commit is contained in:
parent
405f013e7a
commit
5ac7f9442a
@ -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);
|
||||
vm.enabled = vm.isAdmin ? 0 : 1;
|
||||
vm.toggle = toggle;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user