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
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roque
erp5
Commits
346a7e84
Commit
346a7e84
authored
Jan 28, 2016
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing security declarations.
parent
a7537daa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
product/ERP5SyncML/Document/SyncMLSubscription.py
product/ERP5SyncML/Document/SyncMLSubscription.py
+2
-0
product/ERP5TioSafe/Document/IntegrationModule.py
product/ERP5TioSafe/Document/IntegrationModule.py
+2
-0
product/ERP5TioSafe/Document/IntegrationSite.py
product/ERP5TioSafe/Document/IntegrationSite.py
+6
-0
No files found.
product/ERP5SyncML/Document/SyncMLSubscription.py
View file @
346a7e84
...
@@ -207,6 +207,7 @@ class SyncMLSubscription(XMLObject):
...
@@ -207,6 +207,7 @@ class SyncMLSubscription(XMLObject):
"""
"""
return
"%s%%"
%
(
self
.
getSourceValue
().
getPath
().
replace
(
"_"
,
"
\
_
"
),)
return
"%s%%"
%
(
self
.
getSourceValue
().
getPath
().
replace
(
"_"
,
"
\
_
"
),)
security.declarePrivate('sendSyncCommand')
def sendSyncCommand(self, min_gid, max_gid, message_id, activate_kw):
def sendSyncCommand(self, min_gid, max_gid, message_id, activate_kw):
"""
"""
This methods is intented to be called by asynchronous engine in activity to
This methods is intented to be called by asynchronous engine in activity to
...
@@ -670,6 +671,7 @@ class SyncMLSubscription(XMLObject):
...
@@ -670,6 +671,7 @@ class SyncMLSubscription(XMLObject):
self.activate(**final_activate_kw).sendMessage(xml=str(syncml_response))
self.activate(**final_activate_kw).sendMessage(xml=str(syncml_response))
security.declarePrivate('getDeletedSyncMLData')
def getDeletedSyncMLData(self, syncml_response=None):
def getDeletedSyncMLData(self, syncml_response=None):
"""
"""
Retrieve & generate the syncml message for messages that were deleted
Retrieve & generate the syncml message for messages that were deleted
...
...
product/ERP5TioSafe/Document/IntegrationModule.py
View file @
346a7e84
...
@@ -98,6 +98,8 @@ class IntegrationModule(XMLObject):
...
@@ -98,6 +98,8 @@ class IntegrationModule(XMLObject):
except
ValueError
,
msg
:
except
ValueError
,
msg
:
raise
KeyError
,
msg
raise
KeyError
,
msg
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getGIDFor'
)
def
getGIDFor
(
self
,
item
):
def
getGIDFor
(
self
,
item
):
"""
"""
Return the gid for a given local id
Return the gid for a given local id
...
...
product/ERP5TioSafe/Document/IntegrationSite.py
View file @
346a7e84
...
@@ -61,6 +61,8 @@ class IntegrationSite(Folder):
...
@@ -61,6 +61,8 @@ class IntegrationSite(Folder):
)
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getCategoryFromMapping'
)
def
getCategoryFromMapping
(
self
,
category
,
product
=
None
,
create_mapping
=
False
,
def
getCategoryFromMapping
(
self
,
category
,
product
=
None
,
create_mapping
=
False
,
create_mapping_line
=
False
):
create_mapping_line
=
False
):
"""
"""
...
@@ -144,6 +146,8 @@ class IntegrationSite(Folder):
...
@@ -144,6 +146,8 @@ class IntegrationSite(Folder):
raise
ValueError
,
"Mapping not defined for %s"
%
category
raise
ValueError
,
"Mapping not defined for %s"
%
category
return
mapped_variation_category
[
-
1
]
return
mapped_variation_category
[
-
1
]
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getMappingFromCategory'
)
def
getMappingFromCategory
(
self
,
category
):
def
getMappingFromCategory
(
self
,
category
):
"""
"""
This method allows to retrieve through the mapping in the integration
This method allows to retrieve through the mapping in the integration
...
@@ -180,6 +184,8 @@ class IntegrationSite(Folder):
...
@@ -180,6 +184,8 @@ class IntegrationSite(Folder):
# individual variation
# individual variation
return
'/'
.
join
([
mapping
.
getSourceReference
(),
variation
])
return
'/'
.
join
([
mapping
.
getSourceReference
(),
variation
])
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getMappingFromProperty'
)
def
getMappingFromProperty
(
self
,
base_mapping
,
property_name
):
def
getMappingFromProperty
(
self
,
base_mapping
,
property_name
):
"""
"""
This method allows to retrieve throuhh the mapping in the integration
This method allows to retrieve throuhh the mapping in the integration
...
...
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