From 53583741babf0e5830c01d06f86557b0e6bd801d Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Thu, 20 Jul 2017 15:48:05 +0200 Subject: [PATCH] fix(UAC): fix the ability to update the ownership of a resource from public to another type (#1054) --- app/components/container/container.html | 1 + app/components/service/service.html | 1 + app/components/volume/volume.html | 1 + app/directives/accessControlPanel/por-access-control-panel.js | 2 ++ .../accessControlPanel/porAccessControlPanelController.js | 2 +- 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/components/container/container.html b/app/components/container/container.html index 11b831635..ff270be5c 100644 --- a/app/components/container/container.html +++ b/app/components/container/container.html @@ -94,6 +94,7 @@ diff --git a/app/components/service/service.html b/app/components/service/service.html index cec143309..7cbe03a89 100644 --- a/app/components/service/service.html +++ b/app/components/service/service.html @@ -128,6 +128,7 @@ diff --git a/app/components/volume/volume.html b/app/components/volume/volume.html index fcdc8f52b..15ebfc41e 100644 --- a/app/components/volume/volume.html +++ b/app/components/volume/volume.html @@ -50,6 +50,7 @@ diff --git a/app/directives/accessControlPanel/por-access-control-panel.js b/app/directives/accessControlPanel/por-access-control-panel.js index 6bde5f128..afed037c2 100644 --- a/app/directives/accessControlPanel/por-access-control-panel.js +++ b/app/directives/accessControlPanel/por-access-control-panel.js @@ -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. diff --git a/app/directives/accessControlPanel/porAccessControlPanelController.js b/app/directives/accessControlPanel/porAccessControlPanelController.js index 13914606a..32c3f8635 100644 --- a/app/directives/accessControlPanel/porAccessControlPanelController.js +++ b/app/directives/accessControlPanel/porAccessControlPanelController.js @@ -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,