Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
138
Merge Requests
138
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
26d2e430
Commit
26d2e430
authored
Jul 24, 2024
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_antivirus_clammit: clammit/clamd implementation to be used with erp5_antivirus
parent
5c812b85
Changes
38
Show whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
1667 additions
and
0 deletions
+1667
-0
bt5/erp5_antivirus_clammit/ActionTemplateItem/portal_types/Clammit%20Connector/view.xml
...ionTemplateItem/portal_types/Clammit%20Connector/view.xml
+81
-0
bt5/erp5_antivirus_clammit/DocumentTemplateItem/portal_components/document.erp5.ClammitConnector.py
...eItem/portal_components/document.erp5.ClammitConnector.py
+70
-0
bt5/erp5_antivirus_clammit/DocumentTemplateItem/portal_components/document.erp5.ClammitConnector.xml
...Item/portal_components/document.erp5.ClammitConnector.xml
+102
-0
bt5/erp5_antivirus_clammit/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
...eAllowedContentTypeTemplateItem/allowed_content_types.xml
+5
-0
bt5/erp5_antivirus_clammit/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
...rtalTypePropertySheetTemplateItem/property_sheet_list.xml
+7
-0
bt5/erp5_antivirus_clammit/PortalTypeTemplateItem/portal_types/Clammit%20Connector.xml
...rtalTypeTemplateItem/portal_types/Clammit%20Connector.xml
+56
-0
bt5/erp5_antivirus_clammit/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+38
-0
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit.xml
.../SkinTemplateItem/portal_skins/erp5_antivirus_clammit.xml
+26
-0
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/ClammitConnector_view.xml
...al_skins/erp5_antivirus_clammit/ClammitConnector_view.xml
+167
-0
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/ClammitConnector_view/my_bind_address.xml
...tivirus_clammit/ClammitConnector_view/my_bind_address.xml
+96
-0
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/ClammitConnector_view/my_description.xml
...ntivirus_clammit/ClammitConnector_view/my_description.xml
+96
-0
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/ClammitConnector_view/my_reference.xml
..._antivirus_clammit/ClammitConnector_view/my_reference.xml
+90
-0
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/ClammitConnector_view/my_timeout.xml
...p5_antivirus_clammit/ClammitConnector_view/my_timeout.xml
+84
-0
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/ClammitConnector_view/my_translated_validation_state_title.xml
...itConnector_view/my_translated_validation_state_title.xml
+90
-0
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/ClammitConnector_view/my_url_string.xml
...antivirus_clammit/ClammitConnector_view/my_url_string.xml
+96
-0
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/Document_activateRunClammitScan.py
...erp5_antivirus_clammit/Document_activateRunClammitScan.py
+1
-0
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/Document_activateRunClammitScan.xml
...rp5_antivirus_clammit/Document_activateRunClammitScan.xml
+62
-0
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/Document_runClammitScan.py
...l_skins/erp5_antivirus_clammit/Document_runClammitScan.py
+16
-0
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/Document_runClammitScan.xml
..._skins/erp5_antivirus_clammit/Document_runClammitScan.xml
+70
-0
bt5/erp5_antivirus_clammit/TestTemplateItem/portal_components/test.erp5.testClammitAntivirus.py
...eItem/portal_components/test.erp5.testClammitAntivirus.py
+87
-0
bt5/erp5_antivirus_clammit/TestTemplateItem/portal_components/test.erp5.testClammitAntivirus.xml
...Item/portal_components/test.erp5.testClammitAntivirus.xml
+102
-0
bt5/erp5_antivirus_clammit/WorkflowTemplateItem/portal_workflow/clammit_antivirus_scan_interaction_workflow.xml
..._workflow/clammit_antivirus_scan_interaction_workflow.xml
+78
-0
bt5/erp5_antivirus_clammit/WorkflowTemplateItem/portal_workflow/clammit_antivirus_scan_interaction_workflow/interaction_scan.xml
..._antivirus_scan_interaction_workflow/interaction_scan.xml
+50
-0
bt5/erp5_antivirus_clammit/WorkflowTemplateItem/portal_workflow/clammit_antivirus_scan_interaction_workflow/script_runClammitScan.py
...ivirus_scan_interaction_workflow/script_runClammitScan.py
+1
-0
bt5/erp5_antivirus_clammit/WorkflowTemplateItem/portal_workflow/clammit_antivirus_scan_interaction_workflow/script_runClammitScan.xml
...virus_scan_interaction_workflow/script_runClammitScan.xml
+72
-0
bt5/erp5_antivirus_clammit/bt/dependency_list
bt5/erp5_antivirus_clammit/bt/dependency_list
+1
-0
bt5/erp5_antivirus_clammit/bt/description
bt5/erp5_antivirus_clammit/bt/description
+1
-0
bt5/erp5_antivirus_clammit/bt/template_action_path_list
bt5/erp5_antivirus_clammit/bt/template_action_path_list
+1
-0
bt5/erp5_antivirus_clammit/bt/template_document_id_list
bt5/erp5_antivirus_clammit/bt/template_document_id_list
+1
-0
bt5/erp5_antivirus_clammit/bt/template_format_version
bt5/erp5_antivirus_clammit/bt/template_format_version
+1
-0
bt5/erp5_antivirus_clammit/bt/template_portal_type_allowed_content_type_list
...clammit/bt/template_portal_type_allowed_content_type_list
+1
-0
bt5/erp5_antivirus_clammit/bt/template_portal_type_id_list
bt5/erp5_antivirus_clammit/bt/template_portal_type_id_list
+1
-0
bt5/erp5_antivirus_clammit/bt/template_portal_type_property_sheet_list
...virus_clammit/bt/template_portal_type_property_sheet_list
+3
-0
bt5/erp5_antivirus_clammit/bt/template_portal_type_workflow_chain_list
...virus_clammit/bt/template_portal_type_workflow_chain_list
+10
-0
bt5/erp5_antivirus_clammit/bt/template_skin_id_list
bt5/erp5_antivirus_clammit/bt/template_skin_id_list
+1
-0
bt5/erp5_antivirus_clammit/bt/template_test_id_list
bt5/erp5_antivirus_clammit/bt/template_test_id_list
+1
-0
bt5/erp5_antivirus_clammit/bt/template_workflow_id_list
bt5/erp5_antivirus_clammit/bt/template_workflow_id_list
+1
-0
bt5/erp5_antivirus_clammit/bt/title
bt5/erp5_antivirus_clammit/bt/title
+1
-0
No files found.
bt5/erp5_antivirus_clammit/ActionTemplateItem/portal_types/Clammit%20Connector/view.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_view
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_view
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
view
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
1.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
View
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/ClammitConnector_view
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/DocumentTemplateItem/portal_components/document.erp5.ClammitConnector.py
0 → 100644
View file @
26d2e430
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2013 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.XMLObject
import
XMLObject
import
requests
class
ClammitConnector
(
XMLObject
):
# CMF Type Definition
meta_type
=
"Clammit Connector"
portal_type
=
"Clammit Connector"
# Declarative security
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
_SANE_HTTP_STATUS_CODE
=
200
_INFECTED_HTTP_STATUS_CODE
=
418
_DEFAULT_TIMEOUT
=
30
# In seconds
def
isSafe
(
self
,
data
):
response
=
requests
.
post
(
self
.
getUrlString
()
+
'/scan'
,
files
=
{
'file'
:
data
},
timeout
=
self
.
getTimeout
(
self
.
_DEFAULT_TIMEOUT
),
verify
=
False
,
# TODO: how to do self-certs correctly ?
)
if
response
.
status_code
==
self
.
_SANE_HTTP_STATUS_CODE
:
return
True
elif
response
.
status_code
==
self
.
_INFECTED_HTTP_STATUS_CODE
:
return
False
else
:
raise
ValueError
(
"Unknown status code"
)
def
isReady
(
self
):
response
=
requests
.
get
(
self
.
getUrlString
()
+
'/readyz'
,
timeout
=
self
.
getTimeout
(
self
.
_DEFAULT_TIMEOUT
),
verify
=
False
,
# TODO: how to do self-certs correctly ?
)
if
response
.
status_code
==
200
:
return
True
return
False
\ No newline at end of file
bt5/erp5_antivirus_clammit/DocumentTemplateItem/portal_components/document.erp5.ClammitConnector.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Document Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
ClammitConnector
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
document.erp5.ClammitConnector
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
0 → 100644
View file @
26d2e430
<allowed_content_type_list>
<portal_type
id=
"Web Service Tool"
>
<item>
Clammit Connector
</item>
</portal_type>
</allowed_content_type_list>
\ No newline at end of file
bt5/erp5_antivirus_clammit/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
0 → 100644
View file @
26d2e430
<property_sheet_list>
<portal_type
id=
"Clammit Connector"
>
<item>
Reference
</item>
<item>
SocketClient
</item>
<item>
Url
</item>
</portal_type>
</property_sheet_list>
\ No newline at end of file
bt5/erp5_antivirus_clammit/PortalTypeTemplateItem/portal_types/Clammit%20Connector.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Base Type"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
content_icon
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Clammit Connector
</string>
</value>
</item>
<item>
<key>
<string>
init_script
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
permission
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
type_class
</string>
</key>
<value>
<string>
ClammitConnector
</string>
</value>
</item>
<item>
<key>
<string>
type_interface
</string>
</key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
0 → 100644
View file @
26d2e430
<workflow_chain>
<chain>
<type>
Clammit Connector
</type>
<workflow>
edit_workflow, validation_workflow
</workflow>
</chain>
<chain>
<type>
Drawing
</type>
<workflow>
clammit_antivirus_scan_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Embedded File
</type>
<workflow>
clammit_antivirus_scan_interaction_workflow
</workflow>
</chain>
<chain>
<type>
File
</type>
<workflow>
clammit_antivirus_scan_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Image
</type>
<workflow>
clammit_antivirus_scan_interaction_workflow
</workflow>
</chain>
<chain>
<type>
PDF
</type>
<workflow>
clammit_antivirus_scan_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Presentation
</type>
<workflow>
clammit_antivirus_scan_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Spreadsheet
</type>
<workflow>
clammit_antivirus_scan_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Text
</type>
<workflow>
clammit_antivirus_scan_interaction_workflow
</workflow>
</chain>
</workflow_chain>
\ No newline at end of file
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Folder"
module=
"OFS.Folder"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
erp5_antivirus_clammit
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/ClammitConnector_view.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5 Form"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
Base_edit
</string>
</value>
</item>
<item>
<key>
<string>
action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
edit_order
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
left
</string>
<string>
right
</string>
<string>
center
</string>
<string>
bottom
</string>
<string>
hidden
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
center
</string>
</key>
<value>
<list>
<string>
my_description
</string>
</list>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list>
<string>
my_reference
</string>
</list>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list>
<string>
my_url_string
</string>
<string>
my_bind_address
</string>
<string>
my_timeout
</string>
<string>
my_translated_validation_state_title
</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ClammitConnector_view
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
ClammitConnector_view
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_view
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Clammit Connector
</string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
update_action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
update_action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/ClammitConnector_view/my_bind_address.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_bind_address
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Bind Address
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/ClammitConnector_view/my_description.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_description
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_text_area_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Private Key
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/ClammitConnector_view/my_reference.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_reference
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_reference
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/ClammitConnector_view/my_timeout.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_timeout
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_float_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Timeout
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/ClammitConnector_view/my_translated_validation_state_title.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_translated_validation_state_title
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_translated_workflow_state_title
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/ClammitConnector_view/my_url_string.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_url_string
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
URL
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/Document_activateRunClammitScan.py
0 → 100644
View file @
26d2e430
context
.
activate
().
Document_runClammitScan
()
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/Document_activateRunClammitScan.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Document_activateRunClammitScan
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/Document_runClammitScan.py
0 → 100644
View file @
26d2e430
from
erp5.component.module.Log
import
log
# Raise if this script is not called within an activity
context
.
getActivityRuntimeEnvironment
()
clammit_connector
,
=
context
.
getPortalObject
().
portal_web_services
.
searchFolder
(
portal_type
=
"Clammit Connector"
,
limit
=
1
,
)
clammit_connector_value
=
clammit_connector
.
getObject
()
comment
=
"Checked by ClamAV Antivirus"
if
clammit_connector_value
.
isSafe
(
context
.
getData
()):
context
.
setSafe
(
comment
=
comment
)
else
:
log
(
"ClamAV result: the file %s has been found infected"
%
context
.
getRelativeUrl
())
context
.
setInfected
(
comment
=
comment
)
bt5/erp5_antivirus_clammit/SkinTemplateItem/portal_skins/erp5_antivirus_clammit/Document_runClammitScan.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Document_runClammitScan
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/TestTemplateItem/portal_components/test.erp5.testClammitAntivirus.py
0 → 100644
View file @
26d2e430
##############################################################################
#
# Copyright (c) 2002-2024 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
import
mock
from
erp5.component.document.ClammitConnector
import
ClammitConnector
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
class
TestClammitAntivirus
(
ERP5TypeTestCase
):
"""
When the bt5 erp5_antivirus_clammit is installed, documents
that are marked suspect (workflow state, provided by erp5_antivirus)
will be automatically submited to an antivirus scan, and then marked
safe or infected.
"""
_SANE_HTTP_STATUS_CODE
=
ClammitConnector
.
_SANE_HTTP_STATUS_CODE
_INFECTED_HTTP_STATUS_CODE
=
ClammitConnector
.
_INFECTED_HTTP_STATUS_CODE
def
getResponseMock
(
self
,
expected_status_code
):
def
_responseMock
(
*
args
,
**
kw
):
class
Response
:
status_code
=
expected_status_code
return
Response
()
return
_responseMock
def
afterSetUp
(
self
):
"""
This is ran before anything, used to set the environment
"""
portal
=
self
.
portal
portal_web_services
=
portal
.
portal_web_services
self
.
clammit_connector
=
portal_web_services
.
get
(
"clammit_test_connector"
)
if
self
.
clammit_connector
is
None
:
self
.
clammit_connector
=
portal_web_services
.
newContent
(
id
=
"clammit_test_connector"
,
portal_type
=
"Clammit Connector"
,
reference
=
"clammit_test_connector"
,
url_string
=
"https://localhost:3000/clammit"
,
timeout
=
30
,
)
@
mock
.
patch
(
"requests.request"
)
def
test_analyse_safe_document
(
self
,
requests_request_mock
):
requests_request_mock
.
side_effect
=
self
.
getResponseMock
(
self
.
_SANE_HTTP_STATUS_CODE
)
document_value
=
self
.
portal
.
document_module
.
newContent
(
portal_type
=
"File"
,
data
=
"hello_world"
,
)
document_value
.
setSuspect
()
self
.
tic
()
self
.
assertEqual
(
document_value
.
getScanState
(),
"safe"
)
@
mock
.
patch
(
"requests.request"
)
def
test_analysed_infected_document
(
self
,
requests_request_mock
):
requests_request_mock
.
side_effect
=
self
.
getResponseMock
(
self
.
_INFECTED_HTTP_STATUS_CODE
)
document_value
=
self
.
portal
.
document_module
.
newContent
(
portal_type
=
"File"
,
data
=
b'X5O!P%@AP[4
\
\
PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*'
,
)
document_value
.
setSuspect
()
self
.
tic
()
self
.
assertEqual
(
document_value
.
getScanState
(),
"infected"
)
\ No newline at end of file
bt5/erp5_antivirus_clammit/TestTemplateItem/portal_components/test.erp5.testClammitAntivirus.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Test Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testClammitAntivirus
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testClammitAntivirus
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/WorkflowTemplateItem/portal_workflow/clammit_antivirus_scan_interaction_workflow.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Interaction Workflow"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
clammit_antivirus_scan_interaction_workflow
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Clammit Antivirus Scan Interaction Workflow
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/WorkflowTemplateItem/portal_workflow/clammit_antivirus_scan_interaction_workflow/interaction_scan.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Interaction Workflow Interaction"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
before_commit_script/portal_workflow/clammit_antivirus_scan_interaction_workflow/script_runClammitScan
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
interaction_scan
</string>
</value>
</item>
<item>
<key>
<string>
temporary_document_disallowed
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Scan
</string>
</value>
</item>
<item>
<key>
<string>
trigger_method_id
</string>
</key>
<value>
<tuple>
<string>
setSuspect
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
trigger_once_per_transaction
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/WorkflowTemplateItem/portal_workflow/clammit_antivirus_scan_interaction_workflow/script_runClammitScan.py
0 → 100644
View file @
26d2e430
state_change
[
'object'
].
Document_activateRunClammitScan
()
bt5/erp5_antivirus_clammit/WorkflowTemplateItem/portal_workflow/clammit_antivirus_scan_interaction_workflow/script_runClammitScan.xml
0 → 100644
View file @
26d2e430
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
script_runClammitScan
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
runClammitScan
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_antivirus_clammit/bt/dependency_list
0 → 100644
View file @
26d2e430
erp5_antivirus
\ No newline at end of file
bt5/erp5_antivirus_clammit/bt/description
0 → 100644
View file @
26d2e430
Client to Clammit (HTTP interface to the clamav antivirus)
\ No newline at end of file
bt5/erp5_antivirus_clammit/bt/template_action_path_list
0 → 100644
View file @
26d2e430
Clammit Connector | view
\ No newline at end of file
bt5/erp5_antivirus_clammit/bt/template_document_id_list
0 → 100644
View file @
26d2e430
document.erp5.ClammitConnector
\ No newline at end of file
bt5/erp5_antivirus_clammit/bt/template_format_version
0 → 100644
View file @
26d2e430
1
\ No newline at end of file
bt5/erp5_antivirus_clammit/bt/template_portal_type_allowed_content_type_list
0 → 100644
View file @
26d2e430
Web Service Tool | Clammit Connector
\ No newline at end of file
bt5/erp5_antivirus_clammit/bt/template_portal_type_id_list
0 → 100644
View file @
26d2e430
Clammit Connector
\ No newline at end of file
bt5/erp5_antivirus_clammit/bt/template_portal_type_property_sheet_list
0 → 100644
View file @
26d2e430
Clammit Connector | Reference
Clammit Connector | SocketClient
Clammit Connector | Url
\ No newline at end of file
bt5/erp5_antivirus_clammit/bt/template_portal_type_workflow_chain_list
0 → 100644
View file @
26d2e430
Clammit Connector | edit_workflow
Clammit Connector | validation_workflow
Drawing | clammit_antivirus_scan_interaction_workflow
Embedded File | clammit_antivirus_scan_interaction_workflow
File | clammit_antivirus_scan_interaction_workflow
Image | clammit_antivirus_scan_interaction_workflow
PDF | clammit_antivirus_scan_interaction_workflow
Presentation | clammit_antivirus_scan_interaction_workflow
Spreadsheet | clammit_antivirus_scan_interaction_workflow
Text | clammit_antivirus_scan_interaction_workflow
\ No newline at end of file
bt5/erp5_antivirus_clammit/bt/template_skin_id_list
0 → 100644
View file @
26d2e430
erp5_antivirus_clammit
\ No newline at end of file
bt5/erp5_antivirus_clammit/bt/template_test_id_list
0 → 100644
View file @
26d2e430
test.erp5.testClammitAntivirus
\ No newline at end of file
bt5/erp5_antivirus_clammit/bt/template_workflow_id_list
0 → 100644
View file @
26d2e430
clammit_antivirus_scan_interaction_workflow
\ No newline at end of file
bt5/erp5_antivirus_clammit/bt/title
0 → 100644
View file @
26d2e430
erp5_antivirus_clammit
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment