Add ability for super users to take ownership of namespaces
Fixes #1395
This commit is contained in:
parent
f75949d533
commit
20816804e5
14 changed files with 280 additions and 94 deletions
|
@ -138,6 +138,9 @@
|
|||
<span class="cor-option" option-click="askDeleteOrganization(current_org)">
|
||||
<i class="fa fa-times"></i> Delete Organization
|
||||
</span>
|
||||
<span class="cor-option" option-click="askTakeOwnership(current_org, true)">
|
||||
<i class="fa fa-bolt"></i> Take Ownership
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -223,6 +226,10 @@
|
|||
<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 class="cor-option" option-click="askTakeOwnership(current_user, false)"
|
||||
ng-if="user.username != current_user.username && !current_user.super_user">
|
||||
<i class="fa fa-bolt"></i> Take Ownership
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -233,6 +240,21 @@
|
|||
</div> <!-- /cor-tab-content -->
|
||||
</div> <!-- /cor-tab-panel -->
|
||||
|
||||
<!-- Take ownership dialog -->
|
||||
<div class="cor-confirm-dialog take-ownership-dialog"
|
||||
dialog-context="takeOwnershipInfo"
|
||||
dialog-action="takeOwnership(info, callback)"
|
||||
dialog-title="Take Ownership"
|
||||
dialog-action-title="Take Ownership">
|
||||
Are you sure you want to take ownership of
|
||||
<span ng-if="takeOwnershipInfo.is_org">organization <span class="avatar" data="takeOwnershipInfo.entity.avatar" size="16"></span> {{ takeOwnershipInfo.entity.name }}?</span>
|
||||
<span ng-if="!takeOwnershipInfo.is_org">user namespace <span class="avatar" data="takeOwnershipInfo.entity.avatar" size="16"></span> {{ takeOwnershipInfo .entity.username }}?</span>
|
||||
|
||||
<div class="co-alert co-alert-warning" ng-if="!takeOwnershipInfo.is_org">
|
||||
Note: This will convert the user namespace into an organization. <strong>The user will no longer be able to login to this account.</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal message dialog -->
|
||||
<div class="co-dialog modal fade" id="confirmDeleteUserModal">
|
||||
<div class="modal-dialog">
|
||||
|
|
Reference in a new issue