Skip to content

Commit 75c39ea

Browse files
dsitubrianchandotcom
authored andcommitted
LPD-16000 Use non local service so that permission is checked for virtual instances
1 parent 4466c94 commit 75c39ea

9 files changed

+30
-30
lines changed

modules/apps/commerce/commerce-shipment-web/src/main/java/com/liferay/commerce/shipment/web/internal/display/context/CommerceShipmentDisplayContext.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import com.liferay.commerce.model.CommerceShippingMethod;
2323
import com.liferay.commerce.product.model.CommerceChannel;
2424
import com.liferay.commerce.product.service.CommerceChannelService;
25-
import com.liferay.commerce.service.CommerceAddressLocalService;
25+
import com.liferay.commerce.service.CommerceAddressService;
2626
import com.liferay.commerce.service.CommerceOrderItemService;
2727
import com.liferay.commerce.service.CommerceOrderLocalService;
2828
import com.liferay.commerce.service.CommerceShipmentItemService;
@@ -76,7 +76,7 @@ public class CommerceShipmentDisplayContext
7676
public CommerceShipmentDisplayContext(
7777
ActionHelper actionHelper,
7878
CommerceAddressFormatter commerceAddressFormatter,
79-
CommerceAddressLocalService commerceAddressLocalService,
79+
CommerceAddressService commerceAddressService,
8080
CommerceChannelService commerceChannelService,
8181
CommerceOrderItemService commerceOrderItemService,
8282
CommerceOrderLocalService commerceOrderLocalService,
@@ -89,7 +89,7 @@ public CommerceShipmentDisplayContext(
8989
super(actionHelper, httpServletRequest, portletResourcePermission);
9090

9191
_commerceAddressFormatter = commerceAddressFormatter;
92-
_commerceAddressLocalService = commerceAddressLocalService;
92+
_commerceAddressService = commerceAddressService;
9393
_commerceChannelService = commerceChannelService;
9494
_commerceOrderItemService = commerceOrderItemService;
9595
_commerceOrderLocalService = commerceOrderLocalService;
@@ -186,7 +186,7 @@ public List<CommerceShippingMethod> getCommerceShippingMethods()
186186
}
187187

188188
CommerceAddress commerceAddress =
189-
_commerceAddressLocalService.getCommerceAddress(
189+
_commerceAddressService.getCommerceAddress(
190190
commerceShipment.getCommerceAddressId());
191191

192192
return _commerceShippingMethodService.getCommerceShippingMethods(
@@ -413,7 +413,7 @@ else if ((commerceShipment.getStatus() > shipmentStatus) ||
413413
public CommerceAddress getShippingAddress() throws PortalException {
414414
CommerceShipment commerceShipment = getCommerceShipment();
415415

416-
return _commerceAddressLocalService.fetchCommerceAddress(
416+
return _commerceAddressService.fetchCommerceAddress(
417417
commerceShipment.getCommerceAddressId());
418418
}
419419

@@ -488,7 +488,7 @@ private SearchContext _buildSearchContext() throws PortalException {
488488
CommerceShipmentDisplayContext.class);
489489

490490
private final CommerceAddressFormatter _commerceAddressFormatter;
491-
private final CommerceAddressLocalService _commerceAddressLocalService;
491+
private final CommerceAddressService _commerceAddressService;
492492
private final CommerceChannelService _commerceChannelService;
493493
private final CommerceOrderItemService _commerceOrderItemService;
494494
private final CommerceOrderLocalService _commerceOrderLocalService;

modules/apps/commerce/commerce-shipment-web/src/main/java/com/liferay/commerce/shipment/web/internal/portlet/CommerceShipmentPortlet.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import com.liferay.commerce.constants.CommerceConstants;
1010
import com.liferay.commerce.constants.CommercePortletKeys;
1111
import com.liferay.commerce.product.service.CommerceChannelService;
12-
import com.liferay.commerce.service.CommerceAddressLocalService;
12+
import com.liferay.commerce.service.CommerceAddressService;
1313
import com.liferay.commerce.service.CommerceOrderItemService;
1414
import com.liferay.commerce.service.CommerceOrderLocalService;
1515
import com.liferay.commerce.service.CommerceShipmentItemService;
@@ -68,7 +68,7 @@ public void render(
6868
CommerceShipmentDisplayContext commerceShipmentDisplayContext =
6969
new CommerceShipmentDisplayContext(
7070
_actionHelper, _commerceAddressFormatter,
71-
_commerceAddressLocalService, _commerceChannelService,
71+
_commerceAddressService, _commerceChannelService,
7272
_commerceOrderItemService, _commerceOrderLocalService,
7373
_commerceShipmentItemService, _commerceShippingMethodService,
7474
_countryService, _portal.getHttpServletRequest(renderRequest),
@@ -87,7 +87,7 @@ public void render(
8787
private CommerceAddressFormatter _commerceAddressFormatter;
8888

8989
@Reference
90-
private CommerceAddressLocalService _commerceAddressLocalService;
90+
private CommerceAddressService _commerceAddressService;
9191

9292
@Reference
9393
private CommerceChannelService _commerceChannelService;

modules/apps/commerce/commerce-shipment-web/src/main/java/com/liferay/commerce/shipment/web/internal/portlet/action/AddCommerceShipmentItemsMVCRenderCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import com.liferay.commerce.constants.CommerceConstants;
1010
import com.liferay.commerce.constants.CommercePortletKeys;
1111
import com.liferay.commerce.product.service.CommerceChannelService;
12-
import com.liferay.commerce.service.CommerceAddressLocalService;
12+
import com.liferay.commerce.service.CommerceAddressService;
1313
import com.liferay.commerce.service.CommerceOrderItemService;
1414
import com.liferay.commerce.service.CommerceOrderLocalService;
1515
import com.liferay.commerce.service.CommerceShipmentItemService;
@@ -51,7 +51,7 @@ public String render(
5151
CommerceShipmentDisplayContext commerceShipmentDisplayContext =
5252
new CommerceShipmentDisplayContext(
5353
_actionHelper, _commerceAddressFormatter,
54-
_commerceAddressLocalService, _commerceChannelService,
54+
_commerceAddressService, _commerceChannelService,
5555
_commerceOrderItemService, _commerceOrderLocalService,
5656
_commerceShipmentItemService, _commerceShippingMethodService,
5757
_countryService, _portal.getHttpServletRequest(renderRequest),
@@ -70,7 +70,7 @@ public String render(
7070
private CommerceAddressFormatter _commerceAddressFormatter;
7171

7272
@Reference
73-
private CommerceAddressLocalService _commerceAddressLocalService;
73+
private CommerceAddressService _commerceAddressService;
7474

7575
@Reference
7676
private CommerceChannelService _commerceChannelService;

modules/apps/commerce/commerce-shipment-web/src/main/java/com/liferay/commerce/shipment/web/internal/portlet/action/AddCommerceShipmentMVCRenderCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import com.liferay.commerce.constants.CommerceConstants;
1010
import com.liferay.commerce.constants.CommercePortletKeys;
1111
import com.liferay.commerce.product.service.CommerceChannelService;
12-
import com.liferay.commerce.service.CommerceAddressLocalService;
12+
import com.liferay.commerce.service.CommerceAddressService;
1313
import com.liferay.commerce.service.CommerceOrderItemService;
1414
import com.liferay.commerce.service.CommerceOrderLocalService;
1515
import com.liferay.commerce.service.CommerceShipmentItemService;
@@ -50,7 +50,7 @@ public String render(
5050
CommerceShipmentDisplayContext commerceShipmentDisplayContext =
5151
new CommerceShipmentDisplayContext(
5252
_actionHelper, _commerceAddressFormatter,
53-
_commerceAddressLocalService, _commerceChannelService,
53+
_commerceAddressService, _commerceChannelService,
5454
_commerceOrderItemService, _commerceOrderLocalService,
5555
_commerceShipmentItemService, _commerceShippingMethodService,
5656
_countryService, _portal.getHttpServletRequest(renderRequest),
@@ -69,7 +69,7 @@ public String render(
6969
private CommerceAddressFormatter _commerceAddressFormatter;
7070

7171
@Reference
72-
private CommerceAddressLocalService _commerceAddressLocalService;
72+
private CommerceAddressService _commerceAddressService;
7373

7474
@Reference
7575
private CommerceChannelService _commerceChannelService;

modules/apps/commerce/commerce-shipment-web/src/main/java/com/liferay/commerce/shipment/web/internal/portlet/action/EditCommerceShipmentAddressMVCRenderCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import com.liferay.commerce.constants.CommerceConstants;
1010
import com.liferay.commerce.constants.CommercePortletKeys;
1111
import com.liferay.commerce.product.service.CommerceChannelService;
12-
import com.liferay.commerce.service.CommerceAddressLocalService;
12+
import com.liferay.commerce.service.CommerceAddressService;
1313
import com.liferay.commerce.service.CommerceOrderItemService;
1414
import com.liferay.commerce.service.CommerceOrderLocalService;
1515
import com.liferay.commerce.service.CommerceShipmentItemService;
@@ -51,7 +51,7 @@ public String render(
5151
CommerceShipmentDisplayContext commerceShipmentDisplayContext =
5252
new CommerceShipmentDisplayContext(
5353
_actionHelper, _commerceAddressFormatter,
54-
_commerceAddressLocalService, _commerceChannelService,
54+
_commerceAddressService, _commerceChannelService,
5555
_commerceOrderItemService, _commerceOrderLocalService,
5656
_commerceShipmentItemService, _commerceShippingMethodService,
5757
_countryService, _portal.getHttpServletRequest(renderRequest),
@@ -70,7 +70,7 @@ public String render(
7070
private CommerceAddressFormatter _commerceAddressFormatter;
7171

7272
@Reference
73-
private CommerceAddressLocalService _commerceAddressLocalService;
73+
private CommerceAddressService _commerceAddressService;
7474

7575
@Reference
7676
private CommerceChannelService _commerceChannelService;

modules/apps/commerce/commerce-shipment-web/src/main/java/com/liferay/commerce/shipment/web/internal/portlet/action/EditCommerceShipmentCourierDetailMVCRenderCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import com.liferay.commerce.constants.CommerceConstants;
1010
import com.liferay.commerce.constants.CommercePortletKeys;
1111
import com.liferay.commerce.product.service.CommerceChannelService;
12-
import com.liferay.commerce.service.CommerceAddressLocalService;
12+
import com.liferay.commerce.service.CommerceAddressService;
1313
import com.liferay.commerce.service.CommerceOrderItemService;
1414
import com.liferay.commerce.service.CommerceOrderLocalService;
1515
import com.liferay.commerce.service.CommerceShipmentItemService;
@@ -51,7 +51,7 @@ public String render(
5151
CommerceShipmentDisplayContext commerceShipmentDisplayContext =
5252
new CommerceShipmentDisplayContext(
5353
_actionHelper, _commerceAddressFormatter,
54-
_commerceAddressLocalService, _commerceChannelService,
54+
_commerceAddressService, _commerceChannelService,
5555
_commerceOrderItemService, _commerceOrderLocalService,
5656
_commerceShipmentItemService, _commerceShippingMethodService,
5757
_countryService, _portal.getHttpServletRequest(renderRequest),
@@ -70,7 +70,7 @@ public String render(
7070
private CommerceAddressFormatter _commerceAddressFormatter;
7171

7272
@Reference
73-
private CommerceAddressLocalService _commerceAddressLocalService;
73+
private CommerceAddressService _commerceAddressService;
7474

7575
@Reference
7676
private CommerceChannelService _commerceChannelService;

modules/apps/commerce/commerce-shipment-web/src/main/java/com/liferay/commerce/shipment/web/internal/portlet/action/EditCommerceShipmentExpectedDateMVCRenderCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import com.liferay.commerce.constants.CommerceConstants;
1010
import com.liferay.commerce.constants.CommercePortletKeys;
1111
import com.liferay.commerce.product.service.CommerceChannelService;
12-
import com.liferay.commerce.service.CommerceAddressLocalService;
12+
import com.liferay.commerce.service.CommerceAddressService;
1313
import com.liferay.commerce.service.CommerceOrderItemService;
1414
import com.liferay.commerce.service.CommerceOrderLocalService;
1515
import com.liferay.commerce.service.CommerceShipmentItemService;
@@ -51,7 +51,7 @@ public String render(
5151
CommerceShipmentDisplayContext commerceShipmentDisplayContext =
5252
new CommerceShipmentDisplayContext(
5353
_actionHelper, _commerceAddressFormatter,
54-
_commerceAddressLocalService, _commerceChannelService,
54+
_commerceAddressService, _commerceChannelService,
5555
_commerceOrderItemService, _commerceOrderLocalService,
5656
_commerceShipmentItemService, _commerceShippingMethodService,
5757
_countryService, _portal.getHttpServletRequest(renderRequest),
@@ -70,7 +70,7 @@ public String render(
7070
private CommerceAddressFormatter _commerceAddressFormatter;
7171

7272
@Reference
73-
private CommerceAddressLocalService _commerceAddressLocalService;
73+
private CommerceAddressService _commerceAddressService;
7474

7575
@Reference
7676
private CommerceChannelService _commerceChannelService;

modules/apps/commerce/commerce-shipment-web/src/main/java/com/liferay/commerce/shipment/web/internal/portlet/action/EditCommerceShipmentMVCRenderCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import com.liferay.commerce.constants.CommerceConstants;
1010
import com.liferay.commerce.constants.CommercePortletKeys;
1111
import com.liferay.commerce.product.service.CommerceChannelService;
12-
import com.liferay.commerce.service.CommerceAddressLocalService;
12+
import com.liferay.commerce.service.CommerceAddressService;
1313
import com.liferay.commerce.service.CommerceOrderItemService;
1414
import com.liferay.commerce.service.CommerceOrderLocalService;
1515
import com.liferay.commerce.service.CommerceShipmentItemService;
@@ -55,7 +55,7 @@ public String render(
5555
CommerceShipmentDisplayContext commerceShipmentDisplayContext =
5656
new CommerceShipmentDisplayContext(
5757
_actionHelper, _commerceAddressFormatter,
58-
_commerceAddressLocalService, _commerceChannelService,
58+
_commerceAddressService, _commerceChannelService,
5959
_commerceOrderItemService, _commerceOrderLocalService,
6060
_commerceShipmentItemService, _commerceShippingMethodService,
6161
_countryService, _portal.getHttpServletRequest(renderRequest),
@@ -111,7 +111,7 @@ private void _populatePortletDisplay(RenderRequest renderRequest) {
111111
private CommerceAddressFormatter _commerceAddressFormatter;
112112

113113
@Reference
114-
private CommerceAddressLocalService _commerceAddressLocalService;
114+
private CommerceAddressService _commerceAddressService;
115115

116116
@Reference
117117
private CommerceChannelService _commerceChannelService;

modules/apps/commerce/commerce-shipment-web/src/main/java/com/liferay/commerce/shipment/web/internal/portlet/action/EditCommerceShipmentShippingDateMVCRenderCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import com.liferay.commerce.constants.CommerceConstants;
1010
import com.liferay.commerce.constants.CommercePortletKeys;
1111
import com.liferay.commerce.product.service.CommerceChannelService;
12-
import com.liferay.commerce.service.CommerceAddressLocalService;
12+
import com.liferay.commerce.service.CommerceAddressService;
1313
import com.liferay.commerce.service.CommerceOrderItemService;
1414
import com.liferay.commerce.service.CommerceOrderLocalService;
1515
import com.liferay.commerce.service.CommerceShipmentItemService;
@@ -51,7 +51,7 @@ public String render(
5151
CommerceShipmentDisplayContext commerceShipmentDisplayContext =
5252
new CommerceShipmentDisplayContext(
5353
_actionHelper, _commerceAddressFormatter,
54-
_commerceAddressLocalService, _commerceChannelService,
54+
_commerceAddressService, _commerceChannelService,
5555
_commerceOrderItemService, _commerceOrderLocalService,
5656
_commerceShipmentItemService, _commerceShippingMethodService,
5757
_countryService, _portal.getHttpServletRequest(renderRequest),
@@ -70,7 +70,7 @@ public String render(
7070
private CommerceAddressFormatter _commerceAddressFormatter;
7171

7272
@Reference
73-
private CommerceAddressLocalService _commerceAddressLocalService;
73+
private CommerceAddressService _commerceAddressService;
7474

7575
@Reference
7676
private CommerceChannelService _commerceChannelService;

0 commit comments

Comments
 (0)