fix(UAC): fix the ability to update the ownership of a resource from public to another type (#1054)

pull/1061/head
Anthony Lapenna 2017-07-20 15:48:05 +02:00 committed by GitHub
parent 12eb9671de
commit 53583741ba
5 changed files with 6 additions and 1 deletions

View File

@ -94,6 +94,7 @@
<!-- access-control-panel -->
<por-access-control-panel
ng-if="container && applicationState.application.authentication"
resource-id="container.Id"
resource-control="container.ResourceControl"
resource-type="'container'">
</por-access-control-panel>

View File

@ -128,6 +128,7 @@
<!-- access-control-panel -->
<por-access-control-panel
ng-if="service && applicationState.application.authentication"
resource-id="service.Id"
resource-control="service.ResourceControl"
resource-type="'service'">
</por-access-control-panel>

View File

@ -50,6 +50,7 @@
<!-- access-control-panel -->
<por-access-control-panel
ng-if="volume && applicationState.application.authentication"
resource-id="volume.Id"
resource-control="volume.ResourceControl"
resource-type="'volume'">
</por-access-control-panel>

View File

@ -2,6 +2,8 @@ angular.module('portainer').component('porAccessControlPanel', {
templateUrl: 'app/directives/accessControlPanel/porAccessControlPanel.html',
controller: 'porAccessControlPanelController',
bindings: {
// The component will use this identifier when updating the resource control object.
resourceId: '<',
// The component will display information about this resource control object.
resourceControl: '=',
// This component is usually displayed inside a resource-details view.

View File

@ -73,7 +73,7 @@ function ($q, $state, UserService, ResourceControlService, Notifications, Authen
function updateOwnership() {
$('#loadingViewSpinner').show();
var resourceId = ctrl.resourceControl.ResourceId;
var resourceId = ctrl.resourceId;
var ownershipParameters = processOwnershipFormValues();
ResourceControlService.applyResourceControlChange(ctrl.resourceType, resourceId,