mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 02:35:17 +01:00
Merge pull request #599 from wknet123/master
Update for toggling admin options check.
This commit is contained in:
commit
5e38e84c89
@ -44,7 +44,7 @@
|
||||
<td width="20%">//u.email//</td>
|
||||
<td width="35%">//u.creation_time | dateL : 'YYYY-MM-DD HH:mm:ss'//</td>
|
||||
<td width="15%">
|
||||
<toggle-admin has-admin-role="u.has_admin_role == 1" user-id="//u.user_id//"></toggle-admin>
|
||||
<toggle-admin has-admin-role="u.has_admin_role" user-id="//u.user_id//"></toggle-admin>
|
||||
</td>
|
||||
<td width="20%">
|
||||
<a href="javascript:void(0)" ng-click="vm.confirmToDelete(u.user_id, u.username)"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
|
@ -25,7 +25,7 @@
|
||||
function ToggleAdminController($scope, ToggleAdminService, $filter, trFilter) {
|
||||
var vm = this;
|
||||
|
||||
vm.isAdmin = (Number(vm.hasAdminRole) === 1);
|
||||
vm.isAdmin = (vm.hasAdminRole === 1);
|
||||
vm.enabled = vm.isAdmin ? 0 : 1;
|
||||
vm.toggle = toggle;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user