1. 27 Sep, 2024 3 commits
    • Roque's avatar
      erp5_officejs: fix error in header rendering · b3c075f1
      Roque authored
      - add notify parameters on controller
      - fix form_view custom submit handling
      b3c075f1
    • Kazuhiko Shiozaki's avatar
      erp5_core: reindex recursively only if indexable children type exists in... · 18e9c69a
      Kazuhiko Shiozaki authored
      erp5_core: reindex recursively only if indexable children type exists in Base_reindexObjectSecurity.
      
      This is important especially for SyncML Subscription having tons of SyncML Signatures that is non-indexable.
      
      Note: first I tried the change in the restricted python only like :
      
      --- product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_reindexObjectSecurity.py
      +++ product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_reindexObjectSecurity.py
      @@ -4,7 +4,8 @@
       # with lots of content could mean hours of non-usable overloaded system.
       type_tool = context.getPortalObject().portal_types
       for portal_type_name in context.getTypeInfo().getTypeAllowedContentTypeList():
      -  if getattr(type_tool, portal_type_name).getTypeAcquireLocalRole():
      +  if getattr(type_tool, portal_type_name).getTypeAcquireLocalRole() and \
      +      type_tool.getPortalTypeClass(portal_type_name).isIndexable():
           reindex = context.recursiveReindexObject
           break
       else:
      
      but I got the following exception :
      
        File "Script (Python)", line 8, in Base_reindexObjectSecurity
          type_tool.getPortalTypeClass(portal_type_name).isIndexable():
        File "/(SR)/eggs/AccessControl-4.4-py2.7-linux-x86_64.egg/AccessControl/users.py", line 179, in allowed
          if self._check_context(object):
        File "/(SR)/parts/erp5/product/ERP5Type/patches/AccessControl_patch.py", line 44, in _check_context
          return aq_inContextOf(getattr(object, '__self__', object), context, 1)
      TypeError: unbound method _aq_dynamic() must be called with Address instance as first argument (got str instance instead)
      18e9c69a
    • Georgios Dagkakis's avatar
      erp5_core: Allow more attributes in gadget_html_viewer.js · 3ec082b3
      Georgios Dagkakis authored
      Plus, remove the duplicate of 'text-align'
      3ec082b3
  2. 26 Sep, 2024 1 commit
    • Jérome Perrin's avatar
      core: fix Flags not at the start of the expression warnings with new mimetypes_registry · b819f8da
      Jérome Perrin authored
      This is follow up of commit 0000dee0 (erp5_core: update
      mimetypes_registry with shared-mime-info_2.4-5 and media-types_10.1.0.,
      2024-09-17), after this change, Products.MimetypesRegistry build regular
      expressions with fnmatch.translate, which on python2 produces regular
      expressions like:
      
           >>> fnmatch.translate('*.aaa')
           '.*\\.aaa\\Z(?ms)
      
      such expressions cause a warning in python3:
      
          >>> re.compile('.*\\.aaa\\Z(?ms)')
          ...
          re.error: global flags not at the start of the expression at position 9
      
      Running this on python3 would be incompatible with python2, because
      `fnmatch.translate` on python3 generates regular expressions that are not
      valid on python2.
      
      To solve this mimetypes_registry.xml was edited by hand to move the
      flags at the beginning, replacing for example '.*\\.aaa\\Z(?ms)' by
      '(?ms).*\\.aaa\\Z'
      b819f8da
  3. 25 Sep, 2024 1 commit
  4. 24 Sep, 2024 3 commits
  5. 23 Sep, 2024 12 commits
  6. 20 Sep, 2024 1 commit
  7. 19 Sep, 2024 4 commits
  8. 18 Sep, 2024 3 commits
  9. 17 Sep, 2024 11 commits
  10. 16 Sep, 2024 1 commit
    • Romain Courteaud's avatar
      erp5_hal_json_style/erp5_web: fix http cache condition · bcd82831
      Romain Courteaud authored
      The main query to the hateoas web section must be cache by the browser,
      to reduce the number of queries by 2.
      
      Caching policy manager conditions are checked before calculating the query result,
      and so, it is not possible anymore to wait for the script to explicitely
      ask for the result to be cached.
      bcd82831