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
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
45a23b27
Commit
45a23b27
authored
Nov 13, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
officejs_support_request_ui: Tolerate Events with non visible attachments in RSS
parent
9d147ce2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_getEventList.py
...cejs_support_request/SupportRequestModule_getEventList.py
+1
-1
bt5/erp5_officejs_support_request_ui_test/TestTemplateItem/portal_components/test.erp5.testSupportRequest.py
...ateItem/portal_components/test.erp5.testSupportRequest.py
+19
-0
No files found.
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_getEventList.py
View file @
45a23b27
...
@@ -58,7 +58,7 @@ for brain in portal.portal_simulation.getMovementHistoryList(
...
@@ -58,7 +58,7 @@ for brain in portal.portal_simulation.getMovementHistoryList(
'thumbnail'
:
(
# XXX this is not really a thumbnail, but it's what RSS style uses for <enclosure/>
'thumbnail'
:
(
# XXX this is not really a thumbnail, but it's what RSS style uses for <enclosure/>
# Also, with this `thumbnail` it will look good for image, and most of the time
# Also, with this `thumbnail` it will look good for image, and most of the time
# users attach a screenshot of their problem.
# users attach a screenshot of their problem.
event
.
getDefaultAggregate
(
portal_type
=
document_type_list
)
event
.
getDefaultAggregate
(
portal_type
=
document_type_list
,
checked_permission
=
"View"
)
and
event
.
getDefaultAggregateValue
(
portal_type
=
document_type_list
).
File_getDownloadUrl
()
and
event
.
getDefaultAggregateValue
(
portal_type
=
document_type_list
).
File_getDownloadUrl
()
or
None
)
or
None
)
}
}
...
...
bt5/erp5_officejs_support_request_ui_test/TestTemplateItem/portal_components/test.erp5.testSupportRequest.py
View file @
45a23b27
...
@@ -548,6 +548,25 @@ class TestSupportRequestRSSSNonVisibleSupportRequest(SupportRequestRSSTestCase,
...
@@ -548,6 +548,25 @@ class TestSupportRequestRSSSNonVisibleSupportRequest(SupportRequestRSSTestCase,
self
.
assertFalse
(
rss
.
bozo
)
self
.
assertFalse
(
rss
.
bozo
)
class
TestSupportRequestRSSSNonVisibleAttachment
(
SupportRequestRSSTestCase
,
DefaultTestRSSMixin
):
"""Edge case test for support request RSS for an event (visible by user) with attachment not visible by user.
"""
def
afterSetUp
(
self
):
super
(
TestSupportRequestRSSSNonVisibleAttachment
,
self
).
afterSetUp
()
self
.
attached_document
.
manage_permission
(
'View'
,
[
'Manager'
],
0
)
self
.
attached_document
.
reindexObject
()
self
.
tic
()
def
_checkRSS
(
self
,
response
):
self
.
assertEqual
(
httplib
.
OK
,
response
.
getStatus
())
rss
=
feedparser
.
parse
(
response
.
getBody
())
item
,
=
rss
.
entries
# no enclosure
self
.
assertEqual
([],
[
link
for
link
in
item
[
'links'
]
if
link
[
'rel'
]
==
'enclosure'
])
# https://pythonhosted.org/feedparser/bozo.html#advanced-bozo
self
.
assertFalse
(
rss
.
bozo
)
class
TestIngestPostAsWebMessage
(
SupportRequestTestCase
):
class
TestIngestPostAsWebMessage
(
SupportRequestTestCase
):
"""Tests ingesting HTML Post into web messages.
"""Tests ingesting HTML Post into web messages.
"""
"""
...
...
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