You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
people on which receive an inquiry for a request get an exception when they try to open the ApprovalSidesheetComponent.
Reason is that the user has no permission to get the PortalItshopApprovalRequestsInteractive-Entity.
In more detail: The WorkflowSingleActionComponent is calling getExtendedEntity which is loading the interactive object of the PortalItshopApprovalRequests.
The user receives a 404 from the ApiServer as the WhereClause doesn't enable him to get the interactive entity.
workflow-single-action.component.ts line 124: const entityWrapper = await this.approvalService.getExtendedEntity(this.request.key);
=>
approvals.service.ts line 192: await this.apiService.typedClient.PortalItshopApproveRequestsInteractive.Get_byid(entityReference)
If you check how the inquiries are shown, you will notice that the InquiriesComponent is loading the data with setting the parameter forinquiry to true which modifies the whereclause on the apiserver:
inquiries.component.ts line 130: this.navigationState.forinquiry = true;
As the PortalItshopApprovalRequestsInteractiveWrapper.Get_byid doesn't allow to provide the parameter forinquiry (which is equal to all Get_bid-methods), it seems there is no easy fix.
I'm talking about v92-branch, but didn't check if the same applies to v93.
Would appreciate a reliable workaround until you fix it :)
BR
Andreas
UPDATE:
My Workaround is to modify the API-Endpoint like this:
builder.ModifyQueryMethod("itshop/approve/requests", method =>
{
method.WhereClauseProviders.Add(new WhereClauseProvider((qr, originalWhereClause) =>
{
// based on debugging the parameter UID_PersonWantsOrg is filled when the GetById is called
string UID_PersonWantsOrg = qr.Parameters.Get<string>("UID_PersonWantsOrg");
if (string.IsNullOrEmpty(UID_PersonWantsOrg))
{
return originalWhereClause;
}
string inquiryWhereClause = f.AndRelation(
f.Comparison("RulerLevel", 2, ValType.Int, CompareOperator.NotEqual),
f.UidComparison("UID_PersonWantsOrg", UID_PersonWantsOrg),
string.Format("UID_PersonWantsOrg in(select uid_personwantsorg from QER_VITshopDecisionPerson where {0})",
f.AndRelation(
f.Comparison("DecisionOrComment", "C", ValType.String, CompareOperator.Equal),
f.UidComparison("UID_Person", qr.Session.User().Uid)
)
)
);
string newWhereClause = string.Format("UID_PersonWantsOrg in (select UID_PersonWantsOrg from PWOHelperPWO where {0}" +
" union all " +
"select UID_PersonWantsOrg from PWOHelperPWO where {1})", originalWhereClause, inquiryWhereClause);
return newWhereClause;
}));
});
The text was updated successfully, but these errors were encountered:
Hi guys,
people on which receive an inquiry for a request get an exception when they try to open the ApprovalSidesheetComponent.
Reason is that the user has no permission to get the PortalItshopApprovalRequestsInteractive-Entity.
In more detail: The WorkflowSingleActionComponent is calling getExtendedEntity which is loading the interactive object of the PortalItshopApprovalRequests.
The user receives a 404 from the ApiServer as the WhereClause doesn't enable him to get the interactive entity.
workflow-single-action.component.ts line 124:
const entityWrapper = await this.approvalService.getExtendedEntity(this.request.key);
=>
approvals.service.ts line 192:
await this.apiService.typedClient.PortalItshopApproveRequestsInteractive.Get_byid(entityReference)
If you check how the inquiries are shown, you will notice that the InquiriesComponent is loading the data with setting the parameter forinquiry to true which modifies the whereclause on the apiserver:
inquiries.component.ts line 130:
this.navigationState.forinquiry = true;
As the PortalItshopApprovalRequestsInteractiveWrapper.Get_byid doesn't allow to provide the parameter forinquiry (which is equal to all Get_bid-methods), it seems there is no easy fix.
I'm talking about v92-branch, but didn't check if the same applies to v93.
Would appreciate a reliable workaround until you fix it :)
BR
Andreas
UPDATE:
My Workaround is to modify the API-Endpoint like this:
The text was updated successfully, but these errors were encountered: