This is an automated email from the ASF dual-hosted git repository.
nmalin 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 8a51586 Fixed: service createCommunicationEventWithoutPermission
failed to store a communication (OFBIZ-12074)
8a51586 is described below
commit 8a51586c63eb9884c40ce65af2076f67ec128f4e
Author: Nicolas Malin <[email protected]>
AuthorDate: Mon Nov 30 09:40:04 2020 +0100
Fixed: service createCommunicationEventWithoutPermission failed to store a
communication
(OFBIZ-12074)
When you call the service createCommunicationEventWithoutPermission to
create a anonymous communication or from a user without party permission, the
service failed due to missing permission.
With the minilang to groovy conversion the userLogin system it's not loaded
before call the main service createCommunicationEvent
---
.../groovyScripts/communication/CommunicationEventServices.groovy | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/applications/party/groovyScripts/communication/CommunicationEventServices.groovy
b/applications/party/groovyScripts/communication/CommunicationEventServices.groovy
index dffed1c..b2fb799 100644
---
a/applications/party/groovyScripts/communication/CommunicationEventServices.groovy
+++
b/applications/party/groovyScripts/communication/CommunicationEventServices.groovy
@@ -205,7 +205,9 @@ def createCommunicationEvent() {
* @return
*/
def createCommunicationEventWithoutPermission() {
- Map result = run service: 'createCommunicationEvent', with: [*:parameters]
+ GenericValue system = from("UserLogin").where(userLoginId:
'system').cache().queryOne()
+ Map result = run service: 'createCommunicationEvent', with: [*:parameters,
+ userLogin:
system]
return result
}