- 03 Oct, 2017 24 commits
-
-
Georgios Dagkakis authored
As acquired property, that is Boolean to define if the 301 redirect would happen when publishing the url without slash
-
Georgios Dagkakis authored
with its reference and containing trailing slash. 301 redirection should be raised to the url without slash. Also, fix test_WebSection_add_trailing_slash_in_url since now it expects permanent redirection (301)
-
Georgios Dagkakis authored
raise 301 redirect to the url excluding the slash This is different than Web Section. But in Web Page we need no-slash since we would render all other sources in the container Web Section, so keeping the caches
-
Georgios Dagkakis authored
Also, url that is published in test_14_AccessWebSiteForWithDifferentUserPreferences iotherwise the response is the redirect, making the test fail
-
Georgios Dagkakis authored
from double slashes. This to give compatibility with definition in actions on Web Section and Web Site portal types, for which now absolute_url returns a trailing slash, so definitions like: string:${object_url}/WebSection_xxx would create a url with double slashes
-
Georgios Dagkakis authored
in case we publish with different languages
-
Georgios Dagkakis authored
Better for Search Engine Optimization Also, raise redirect to add trailing slash only if request is GET
-
Gabriel Monnerat authored
-
Gabriel Monnerat authored
renderJS gadget HTML uses relative URLs to link to there javascript/CSS files. Absolute URL calculation is resolved dynamically by the browser when loading the gadget. When accessing an ERP5 web section without a trailing / in the URL, the browser will calculate absolute URL from the parent document and not the web site itself. Example: In http://foo.com/web_site_module/bar , the relative URL couscous.js will be resolved http://foo.com/web_site_module/couscous.js If couscous.js is a document from DMS (Web Page for example), such URL can not be resolved and leads to a 404 error. One solution to solve this is to redirect (302) the browser when accessing a Web Section (Web Site is a web section) directly in ERP5. Example: http://foo.com/web_site_module/bar -> http://foo.com/web_site_module/bar/ But http://foo.com/web_site_module/bar/view should not redirect
-
Georgios Dagkakis authored
Note: This is not a complete work, i.e. it is not supposed to update all url calculations of generic ERP5. It is done so that: - Other pending work can use it - Demonstrate how the API should be used and test it
-
Georgios Dagkakis authored
for a base document, given the form_id, document_reference and GET parameters (provisional version, for testing)
-
Vincent Bechu authored
-
Ayush Tiwari authored
-
Ayush Tiwari authored
-
Ayush Tiwari authored
Making "modified_object_list" consistent by always containing tuples and not sometimes lists and sometimes tuples.
-
Ayush Tiwari authored
-
Ayush Tiwari authored
Also, update the files where they have been used
-
Ayush Tiwari authored
Using _getOb is always less costly than getattr, as it reduces the need to look in acquisition.
-
Ayush Tiwari authored
And simplify manage_exportProperties function accordingly
-
Ayush Tiwari authored
Also, we don't need to look for `transactionless` connection-id here, as we don't use them in catalog methods. And, update the files where we can use the new function.
-
Georgios Dagkakis authored
Methods used in PaymentTransactionGroup_view Always returned Accounting Transaction Lines (there is no Payment Transaction Line portal type) that were sub-objects of Payment Transactions. But now they can be also sub-objects of Accounting Transactions. So used '...AccountingTransactionLine...' instead of '...PaymentTransactionLine...'
-
Georgios Dagkakis authored
-
Vincent Pelletier authored
-
Georgios Dagkakis authored
Previously, this could only be node_uid. In future we should find a more generic approach to make this configurable. Also, add two tests to testInventoryAPI to check queries with selection_domain for getInventoryList and getMovementHistoryList.
-
- 29 Sep, 2017 7 commits
-
-
Tomáš Peterka authored
/reviewed-on nexedi/erp5!426
-
Nicolas Wavrant authored
-
Boxiang Sun authored
- Reindex the support request before add it as HTML Post follow up. - Use custome message when no post content provided. This should fix the 502 Proxy error and 400 error when creating a new Support Request with/without description.
-
Boxiang Sun authored
Use a custom ERP5 script instead global worklist searching.
-
Boxiang Sun authored
ckeditor 4.5.3 cannot work properly on Android and iPhone. Before update it to latest version. We need to check the compatibility issue of other officejs. For now, just use textarea instead buggy ckeditor. And update the test for textarea.
-
Boxiang Sun authored
-
Boxiang Sun authored
Solved issues: - Restore button didn't work after change listbox.changeState to listbox.render. - Restore button should restore the listbox to page zero. - Restore button should be enabled when to refresh the page with expected parameters.
-
- 28 Sep, 2017 9 commits
-
-
Tristan Cavelier authored
-
Tristan Cavelier authored
-
Nicolas Wavrant authored
Some listboxes in ERP5 use "| desc" to sort elements, even if it didn't work (ie: Base_viewEventList/listbox). Also, as "asc" is working (because descending sort is defined by whitelist), adding "desc" makes things more consistent
-
Tomáš Peterka authored
/reviewed-on nexedi/erp5!419
-
Tomáš Peterka authored
-
Tomáš Peterka authored
- close opened tags - replace TH with TD for data cells - prefix invalid attributes "line" and "column" with "data-"
-
Boxiang Sun authored
-
Boxiang Sun authored
-
Jérome Perrin authored
When a user triggers `NotificationTool.sendMessage(recipient=user_id)` to a recipient she does not have access permission on, it now causes this problem (the caller context is a custom script with manager proxy role): ``` Module Products.ERP5.Tool.NotificationTool, line 322, in sendMessage person_value = getUserValueByUserId(person) Module Products.ERP5.Tool.NotificationTool, line 291, in getUserValueByUserId return portal.restrictedTraverse(user['path']) Module OFS.Traversable, line 317, in restrictedTraverse return self.unrestrictedTraverse(path, default, restricted=True) Module OFS.Traversable, line 251, in unrestrictedTraverse - __traceback_info__: (['redacted_person_id'], 'person_module') next = guarded_getattr(obj, name) Unauthorized: You are not allowed to access 'person_module' in this context ``` This is a regression caused by 62d8d3ac . That particular case was working before, because the person was looked up using [catalog]( https://lab.nexedi.com/nexedi/erp5/blob/882f0022c7af4f36c2f31643498ac0b5d82c2217/product/ERP5/Tool/NotificationTool.py#L321-322) so the proxy role from the caller script was taken in to account. Now, we can say that the approach suggested here is not correct and document that the current logged in user must have permission to access the person documents involved as sender or recipient in the notification. Then, if we need to send message to persons the current user does not have access permission, instead of using: ```python portal.portal_notifications.sendMessage(recipient=person.getUserId()) ``` just do: ```python portal.portal_notifications.sendMessage(recipient=person) ``` but the later does not allow for using activities. /cc @vpelletier @gabriel /reviewed-on nexedi/erp5!395
-