b51d7598 by Ean Schuessler

Remove duplicate listProducts service and add WebFacadeStub for MCP integration

- Removed duplicate listProducts service from McpServices.xml as it was causing conflicts
- Added WebFacadeStub.groovy to support web functionality in MCP context
- MCP server analysis complete: identified authorization issues with mcp-business user
- Found that mcp-business lacks proper entity permissions (e.g., mantle.shipment.ShipmentParty)
- Need to implement role-based access control for proper MCP business functionality
- Foundation is solid - 1,200+ services and screens exposed, but authorization layer needed
1 parent f3884d36
......@@ -982,48 +982,6 @@ try {
<service verb="list" noun="Products" authenticate="true" allow-remote="true" transaction-timeout="30">
<description>List products with basic information for MCP business toolkit</description>
<in-parameters>
<parameter name="productCategoryId" required="false"/>
<parameter name="ownerPartyId" required="false"/>
<parameter name="pageSize" type="Integer" default="20"/>
<parameter name="pageIndex" type="Integer" default="0"/>
</in-parameters>
<out-parameters>
<parameter name="products" type="List"/>
<parameter name="totalCount" type="Integer"/>
</out-parameters>
<actions>
<script><![CDATA[
import org.moqui.context.ExecutionContext
import org.moqui.impl.context.UserFacadeImpl.UserInfo
ExecutionContext ec = context.ec
def entityFind = ec.entity.find("mantle.product.Product")
// Apply filters if provided
if (productCategoryId) {
entityFind.condition("productCategoryId", productCategoryId)
}
if (ownerPartyId) {
entityFind.condition("ownerPartyId", ownerPartyId)
}
// Get total count
totalCount = entityFind.count()
// Apply pagination
entityFind.orderBy("productName").limit(pageSize).offset(pageIndex * pageSize)
// Get product list with basic fields
products = entityFind.selectFields(["productId", "productName", "description", "productTypeId",
"productCategoryId", "ownerPartyId", "internalName"]).list()
]]></script>
</actions>
</service>
<!-- Screen-based MCP Services -->
......