This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new 57c34ee747 Fixed: accAndDecPartyInvitationPermissionCheck shows the
wrong error message on an identity mismatch (OFBIZ-13595)
57c34ee747 is described below
commit 57c34ee747c2d47174e1f72983ede55ac1c2c41e
Author: Mridul Pathak <[email protected]>
AuthorDate: Wed Sep 16 18:10:26 2026 +0530
Fixed: accAndDecPartyInvitationPermissionCheck shows the wrong error
message on an identity mismatch (OFBIZ-13595)
When an invitation email resolves to a party that does not match the
logged-in user, the Groovy conversion returned the same hard
PartyInvitationNotValidError used when the email does not resolve to any party
at all, collapsing two distinct minilang cases into one. It now only returns
that hard error when the email fails to resolve to any party, letting the
identity-mismatch case fall through to the existing soft-fail path with its own
PartyInvitationAccAndDecPermissionError message.
---
.../org/apache/ofbiz/party/party/PartyPermissionServices.groovy | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyPermissionServices.groovy
b/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyPermissionServices.groovy
index 118af6fcfa..d22f13e33a 100644
---
a/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyPermissionServices.groovy
+++
b/applications/party/src/main/groovy/org/apache/ofbiz/party/party/PartyPermissionServices.groovy
@@ -178,11 +178,12 @@ Map accAndDecPartyInvitationPermissionCheck() {
}
Map serviceResult = run service: 'findPartyFromEmailAddress',
with: [address: partyInvitation.emailAddress]
String partyId = serviceResult.partyId
- if (partyId && partyId == userLogin.partyId) {
+ if (!partyId) {
+ return error('PartyUiLabels', 'PartyInvitationNotValidError')
+ }
+ if (partyId == userLogin.partyId) {
hasPermission = true
result.hasPermission = hasPermission
- } else {
- return error('PartyUiLabels', 'PartyInvitationNotValidError')
}
}
}