mirror of https://github.com/portainer/portainer
fix(UAC): fix the ability to update the ownership of a resource from public to another type (#1054)
parent
12eb9671de
commit
53583741ba
|
@ -94,6 +94,7 @@
|
||||||
<!-- access-control-panel -->
|
<!-- access-control-panel -->
|
||||||
<por-access-control-panel
|
<por-access-control-panel
|
||||||
ng-if="container && applicationState.application.authentication"
|
ng-if="container && applicationState.application.authentication"
|
||||||
|
resource-id="container.Id"
|
||||||
resource-control="container.ResourceControl"
|
resource-control="container.ResourceControl"
|
||||||
resource-type="'container'">
|
resource-type="'container'">
|
||||||
</por-access-control-panel>
|
</por-access-control-panel>
|
||||||
|
|
|
@ -128,6 +128,7 @@
|
||||||
<!-- access-control-panel -->
|
<!-- access-control-panel -->
|
||||||
<por-access-control-panel
|
<por-access-control-panel
|
||||||
ng-if="service && applicationState.application.authentication"
|
ng-if="service && applicationState.application.authentication"
|
||||||
|
resource-id="service.Id"
|
||||||
resource-control="service.ResourceControl"
|
resource-control="service.ResourceControl"
|
||||||
resource-type="'service'">
|
resource-type="'service'">
|
||||||
</por-access-control-panel>
|
</por-access-control-panel>
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
<!-- access-control-panel -->
|
<!-- access-control-panel -->
|
||||||
<por-access-control-panel
|
<por-access-control-panel
|
||||||
ng-if="volume && applicationState.application.authentication"
|
ng-if="volume && applicationState.application.authentication"
|
||||||
|
resource-id="volume.Id"
|
||||||
resource-control="volume.ResourceControl"
|
resource-control="volume.ResourceControl"
|
||||||
resource-type="'volume'">
|
resource-type="'volume'">
|
||||||
</por-access-control-panel>
|
</por-access-control-panel>
|
||||||
|
|
|
@ -2,6 +2,8 @@ angular.module('portainer').component('porAccessControlPanel', {
|
||||||
templateUrl: 'app/directives/accessControlPanel/porAccessControlPanel.html',
|
templateUrl: 'app/directives/accessControlPanel/porAccessControlPanel.html',
|
||||||
controller: 'porAccessControlPanelController',
|
controller: 'porAccessControlPanelController',
|
||||||
bindings: {
|
bindings: {
|
||||||
|
// The component will use this identifier when updating the resource control object.
|
||||||
|
resourceId: '<',
|
||||||
// The component will display information about this resource control object.
|
// The component will display information about this resource control object.
|
||||||
resourceControl: '=',
|
resourceControl: '=',
|
||||||
// This component is usually displayed inside a resource-details view.
|
// This component is usually displayed inside a resource-details view.
|
||||||
|
|
|
@ -73,7 +73,7 @@ function ($q, $state, UserService, ResourceControlService, Notifications, Authen
|
||||||
function updateOwnership() {
|
function updateOwnership() {
|
||||||
$('#loadingViewSpinner').show();
|
$('#loadingViewSpinner').show();
|
||||||
|
|
||||||
var resourceId = ctrl.resourceControl.ResourceId;
|
var resourceId = ctrl.resourceId;
|
||||||
var ownershipParameters = processOwnershipFormValues();
|
var ownershipParameters = processOwnershipFormValues();
|
||||||
|
|
||||||
ResourceControlService.applyResourceControlChange(ctrl.resourceType, resourceId,
|
ResourceControlService.applyResourceControlChange(ctrl.resourceType, resourceId,
|
||||||
|
|
Loading…
Reference in New Issue