Allow superusers to disable user accounts

This commit is contained in:
Joseph Schorr 2015-05-11 17:13:42 -04:00
parent 442cbed087
commit dc5af7496c
19 changed files with 291 additions and 37 deletions

View file

@ -156,7 +156,8 @@
</thead>
<tr ng-repeat="current_user in (users | filter:search | orderBy:'username')"
class="user-row">
class="user-row"
ng-class="current_user.enabled ? 'enabled': 'disabled'">
<td>
<span class="avatar" data="current_user.avatar" size="24"></span>
</td>
@ -165,6 +166,8 @@
<span class="label label-success" ng-if="user.username == current_user.username">You</span>
<span class="label label-primary"
ng-if="current_user.super_user">Superuser</span>
<span class="label label-default"
ng-if="!current_user.enabled">Disabled</span>
</span>
{{ current_user.username }}
</td>
@ -187,6 +190,9 @@
<span class="cor-option" option-click="showDeleteUser(current_user)">
<i class="fa fa-times"></i> Delete User
</span>
<span class="cor-option" option-click="askDisableUser(current_user)">
<i class="fa" ng-class="current_user.enabled ? 'fa-circle-o' : 'fa-check-circle-o'"></i> <span ng-if="current_user.enabled">Disable</span> <span ng-if="!current_user.enabled">Enable</span> User
</span>
</span>
</td>
</tr>