Skip to content

Commit

Permalink
LPD-16000 Use non local service so that permission is checked for vir…
Browse files Browse the repository at this point in the history
…tual instances
  • Loading branch information
dsitu authored and brianchandotcom committed Feb 8, 2024
1 parent 4466c94 commit 75c39ea
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.liferay.commerce.model.CommerceShippingMethod;
import com.liferay.commerce.product.model.CommerceChannel;
import com.liferay.commerce.product.service.CommerceChannelService;
import com.liferay.commerce.service.CommerceAddressLocalService;
import com.liferay.commerce.service.CommerceAddressService;
import com.liferay.commerce.service.CommerceOrderItemService;
import com.liferay.commerce.service.CommerceOrderLocalService;
import com.liferay.commerce.service.CommerceShipmentItemService;
Expand Down Expand Up @@ -76,7 +76,7 @@ public class CommerceShipmentDisplayContext
public CommerceShipmentDisplayContext(
ActionHelper actionHelper,
CommerceAddressFormatter commerceAddressFormatter,
CommerceAddressLocalService commerceAddressLocalService,
CommerceAddressService commerceAddressService,
CommerceChannelService commerceChannelService,
CommerceOrderItemService commerceOrderItemService,
CommerceOrderLocalService commerceOrderLocalService,
Expand All @@ -89,7 +89,7 @@ public CommerceShipmentDisplayContext(
super(actionHelper, httpServletRequest, portletResourcePermission);

_commerceAddressFormatter = commerceAddressFormatter;
_commerceAddressLocalService = commerceAddressLocalService;
_commerceAddressService = commerceAddressService;
_commerceChannelService = commerceChannelService;
_commerceOrderItemService = commerceOrderItemService;
_commerceOrderLocalService = commerceOrderLocalService;
Expand Down Expand Up @@ -186,7 +186,7 @@ public List<CommerceShippingMethod> getCommerceShippingMethods()
}

CommerceAddress commerceAddress =
_commerceAddressLocalService.getCommerceAddress(
_commerceAddressService.getCommerceAddress(
commerceShipment.getCommerceAddressId());

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

return _commerceAddressLocalService.fetchCommerceAddress(
return _commerceAddressService.fetchCommerceAddress(
commerceShipment.getCommerceAddressId());
}

Expand Down Expand Up @@ -488,7 +488,7 @@ private SearchContext _buildSearchContext() throws PortalException {
CommerceShipmentDisplayContext.class);

private final CommerceAddressFormatter _commerceAddressFormatter;
private final CommerceAddressLocalService _commerceAddressLocalService;
private final CommerceAddressService _commerceAddressService;
private final CommerceChannelService _commerceChannelService;
private final CommerceOrderItemService _commerceOrderItemService;
private final CommerceOrderLocalService _commerceOrderLocalService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.liferay.commerce.constants.CommerceConstants;
import com.liferay.commerce.constants.CommercePortletKeys;
import com.liferay.commerce.product.service.CommerceChannelService;
import com.liferay.commerce.service.CommerceAddressLocalService;
import com.liferay.commerce.service.CommerceAddressService;
import com.liferay.commerce.service.CommerceOrderItemService;
import com.liferay.commerce.service.CommerceOrderLocalService;
import com.liferay.commerce.service.CommerceShipmentItemService;
Expand Down Expand Up @@ -68,7 +68,7 @@ public void render(
CommerceShipmentDisplayContext commerceShipmentDisplayContext =
new CommerceShipmentDisplayContext(
_actionHelper, _commerceAddressFormatter,
_commerceAddressLocalService, _commerceChannelService,
_commerceAddressService, _commerceChannelService,
_commerceOrderItemService, _commerceOrderLocalService,
_commerceShipmentItemService, _commerceShippingMethodService,
_countryService, _portal.getHttpServletRequest(renderRequest),
Expand All @@ -87,7 +87,7 @@ public void render(
private CommerceAddressFormatter _commerceAddressFormatter;

@Reference
private CommerceAddressLocalService _commerceAddressLocalService;
private CommerceAddressService _commerceAddressService;

@Reference
private CommerceChannelService _commerceChannelService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.liferay.commerce.constants.CommerceConstants;
import com.liferay.commerce.constants.CommercePortletKeys;
import com.liferay.commerce.product.service.CommerceChannelService;
import com.liferay.commerce.service.CommerceAddressLocalService;
import com.liferay.commerce.service.CommerceAddressService;
import com.liferay.commerce.service.CommerceOrderItemService;
import com.liferay.commerce.service.CommerceOrderLocalService;
import com.liferay.commerce.service.CommerceShipmentItemService;
Expand Down Expand Up @@ -51,7 +51,7 @@ public String render(
CommerceShipmentDisplayContext commerceShipmentDisplayContext =
new CommerceShipmentDisplayContext(
_actionHelper, _commerceAddressFormatter,
_commerceAddressLocalService, _commerceChannelService,
_commerceAddressService, _commerceChannelService,
_commerceOrderItemService, _commerceOrderLocalService,
_commerceShipmentItemService, _commerceShippingMethodService,
_countryService, _portal.getHttpServletRequest(renderRequest),
Expand All @@ -70,7 +70,7 @@ public String render(
private CommerceAddressFormatter _commerceAddressFormatter;

@Reference
private CommerceAddressLocalService _commerceAddressLocalService;
private CommerceAddressService _commerceAddressService;

@Reference
private CommerceChannelService _commerceChannelService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.liferay.commerce.constants.CommerceConstants;
import com.liferay.commerce.constants.CommercePortletKeys;
import com.liferay.commerce.product.service.CommerceChannelService;
import com.liferay.commerce.service.CommerceAddressLocalService;
import com.liferay.commerce.service.CommerceAddressService;
import com.liferay.commerce.service.CommerceOrderItemService;
import com.liferay.commerce.service.CommerceOrderLocalService;
import com.liferay.commerce.service.CommerceShipmentItemService;
Expand Down Expand Up @@ -50,7 +50,7 @@ public String render(
CommerceShipmentDisplayContext commerceShipmentDisplayContext =
new CommerceShipmentDisplayContext(
_actionHelper, _commerceAddressFormatter,
_commerceAddressLocalService, _commerceChannelService,
_commerceAddressService, _commerceChannelService,
_commerceOrderItemService, _commerceOrderLocalService,
_commerceShipmentItemService, _commerceShippingMethodService,
_countryService, _portal.getHttpServletRequest(renderRequest),
Expand All @@ -69,7 +69,7 @@ public String render(
private CommerceAddressFormatter _commerceAddressFormatter;

@Reference
private CommerceAddressLocalService _commerceAddressLocalService;
private CommerceAddressService _commerceAddressService;

@Reference
private CommerceChannelService _commerceChannelService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.liferay.commerce.constants.CommerceConstants;
import com.liferay.commerce.constants.CommercePortletKeys;
import com.liferay.commerce.product.service.CommerceChannelService;
import com.liferay.commerce.service.CommerceAddressLocalService;
import com.liferay.commerce.service.CommerceAddressService;
import com.liferay.commerce.service.CommerceOrderItemService;
import com.liferay.commerce.service.CommerceOrderLocalService;
import com.liferay.commerce.service.CommerceShipmentItemService;
Expand Down Expand Up @@ -51,7 +51,7 @@ public String render(
CommerceShipmentDisplayContext commerceShipmentDisplayContext =
new CommerceShipmentDisplayContext(
_actionHelper, _commerceAddressFormatter,
_commerceAddressLocalService, _commerceChannelService,
_commerceAddressService, _commerceChannelService,
_commerceOrderItemService, _commerceOrderLocalService,
_commerceShipmentItemService, _commerceShippingMethodService,
_countryService, _portal.getHttpServletRequest(renderRequest),
Expand All @@ -70,7 +70,7 @@ public String render(
private CommerceAddressFormatter _commerceAddressFormatter;

@Reference
private CommerceAddressLocalService _commerceAddressLocalService;
private CommerceAddressService _commerceAddressService;

@Reference
private CommerceChannelService _commerceChannelService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.liferay.commerce.constants.CommerceConstants;
import com.liferay.commerce.constants.CommercePortletKeys;
import com.liferay.commerce.product.service.CommerceChannelService;
import com.liferay.commerce.service.CommerceAddressLocalService;
import com.liferay.commerce.service.CommerceAddressService;
import com.liferay.commerce.service.CommerceOrderItemService;
import com.liferay.commerce.service.CommerceOrderLocalService;
import com.liferay.commerce.service.CommerceShipmentItemService;
Expand Down Expand Up @@ -51,7 +51,7 @@ public String render(
CommerceShipmentDisplayContext commerceShipmentDisplayContext =
new CommerceShipmentDisplayContext(
_actionHelper, _commerceAddressFormatter,
_commerceAddressLocalService, _commerceChannelService,
_commerceAddressService, _commerceChannelService,
_commerceOrderItemService, _commerceOrderLocalService,
_commerceShipmentItemService, _commerceShippingMethodService,
_countryService, _portal.getHttpServletRequest(renderRequest),
Expand All @@ -70,7 +70,7 @@ public String render(
private CommerceAddressFormatter _commerceAddressFormatter;

@Reference
private CommerceAddressLocalService _commerceAddressLocalService;
private CommerceAddressService _commerceAddressService;

@Reference
private CommerceChannelService _commerceChannelService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.liferay.commerce.constants.CommerceConstants;
import com.liferay.commerce.constants.CommercePortletKeys;
import com.liferay.commerce.product.service.CommerceChannelService;
import com.liferay.commerce.service.CommerceAddressLocalService;
import com.liferay.commerce.service.CommerceAddressService;
import com.liferay.commerce.service.CommerceOrderItemService;
import com.liferay.commerce.service.CommerceOrderLocalService;
import com.liferay.commerce.service.CommerceShipmentItemService;
Expand Down Expand Up @@ -51,7 +51,7 @@ public String render(
CommerceShipmentDisplayContext commerceShipmentDisplayContext =
new CommerceShipmentDisplayContext(
_actionHelper, _commerceAddressFormatter,
_commerceAddressLocalService, _commerceChannelService,
_commerceAddressService, _commerceChannelService,
_commerceOrderItemService, _commerceOrderLocalService,
_commerceShipmentItemService, _commerceShippingMethodService,
_countryService, _portal.getHttpServletRequest(renderRequest),
Expand All @@ -70,7 +70,7 @@ public String render(
private CommerceAddressFormatter _commerceAddressFormatter;

@Reference
private CommerceAddressLocalService _commerceAddressLocalService;
private CommerceAddressService _commerceAddressService;

@Reference
private CommerceChannelService _commerceChannelService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.liferay.commerce.constants.CommerceConstants;
import com.liferay.commerce.constants.CommercePortletKeys;
import com.liferay.commerce.product.service.CommerceChannelService;
import com.liferay.commerce.service.CommerceAddressLocalService;
import com.liferay.commerce.service.CommerceAddressService;
import com.liferay.commerce.service.CommerceOrderItemService;
import com.liferay.commerce.service.CommerceOrderLocalService;
import com.liferay.commerce.service.CommerceShipmentItemService;
Expand Down Expand Up @@ -55,7 +55,7 @@ public String render(
CommerceShipmentDisplayContext commerceShipmentDisplayContext =
new CommerceShipmentDisplayContext(
_actionHelper, _commerceAddressFormatter,
_commerceAddressLocalService, _commerceChannelService,
_commerceAddressService, _commerceChannelService,
_commerceOrderItemService, _commerceOrderLocalService,
_commerceShipmentItemService, _commerceShippingMethodService,
_countryService, _portal.getHttpServletRequest(renderRequest),
Expand Down Expand Up @@ -111,7 +111,7 @@ private void _populatePortletDisplay(RenderRequest renderRequest) {
private CommerceAddressFormatter _commerceAddressFormatter;

@Reference
private CommerceAddressLocalService _commerceAddressLocalService;
private CommerceAddressService _commerceAddressService;

@Reference
private CommerceChannelService _commerceChannelService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.liferay.commerce.constants.CommerceConstants;
import com.liferay.commerce.constants.CommercePortletKeys;
import com.liferay.commerce.product.service.CommerceChannelService;
import com.liferay.commerce.service.CommerceAddressLocalService;
import com.liferay.commerce.service.CommerceAddressService;
import com.liferay.commerce.service.CommerceOrderItemService;
import com.liferay.commerce.service.CommerceOrderLocalService;
import com.liferay.commerce.service.CommerceShipmentItemService;
Expand Down Expand Up @@ -51,7 +51,7 @@ public String render(
CommerceShipmentDisplayContext commerceShipmentDisplayContext =
new CommerceShipmentDisplayContext(
_actionHelper, _commerceAddressFormatter,
_commerceAddressLocalService, _commerceChannelService,
_commerceAddressService, _commerceChannelService,
_commerceOrderItemService, _commerceOrderLocalService,
_commerceShipmentItemService, _commerceShippingMethodService,
_countryService, _portal.getHttpServletRequest(renderRequest),
Expand All @@ -70,7 +70,7 @@ public String render(
private CommerceAddressFormatter _commerceAddressFormatter;

@Reference
private CommerceAddressLocalService _commerceAddressLocalService;
private CommerceAddressService _commerceAddressService;

@Reference
private CommerceChannelService _commerceChannelService;
Expand Down

0 comments on commit 75c39ea

Please sign in to comment.