An error occurred fetching the project authors.
  1. 24 Sep, 2024 1 commit
  2. 16 Apr, 2024 1 commit
    • Vincent Pelletier's avatar
      Optimise security group generation performance · 354c857e
      Vincent Pelletier authored
      Improvements compared to the previous implementation:
      - avoid looking up the user document again, when the PAS plugin already did
        that job
      - make it possible to call a single script when multiple sources of groups
        are based on the same documents, avoiding iterating unnecessarily on
        those same documents multiple times
      - avoid repeating the same membership value (ex: when a user has multiple
        assignments with a common membership subset)
      - avoid resolving the same relation more than once
      - do not go from document value to relative URL only to go from relative
        URL back to document value at the next step
      - move security group id extraction to unrestricted python, as the security
        overhead was taking a large amount of time
      In a security setup with 8 scripts (all Assignment-based), 6 base
      categories, and 4 Assignments (all valid), this implementation is 10 times
      faster at producing the same group id set as the previous one.
      354c857e
  3. 05 Mar, 2024 1 commit
  4. 21 Feb, 2024 2 commits
  5. 17 May, 2023 1 commit
  6. 20 Mar, 2023 2 commits
    • Jérome Perrin's avatar
      *: use getPortalObject directly · 58f528bb
      Jérome Perrin authored
      Products.CMFCore's version 2.7.0 of portal_url.getPortalObject
      returns the portal in an incomplete acquisition context, which
      causes issues when the site is registered as ISiteRoot utility
      (the typical error being AttributeError REQUEST)
      
      ERP5Site.getPortalObject works just fine and is used in many
      places, this commit replaces all occurences of
      portal_url.getPortalObject by getPortalObject.
      58f528bb
    • Jérome Perrin's avatar
      ERP5Site: unregister the portal as ISiteRoot utility · 85852708
      Jérome Perrin authored
      Some old ERP5 site were registered as ISiteRoot and this cause
      issues with Products.CMFCore update 2.2.10 -> 2.7
      85852708
  7. 07 Mar, 2023 1 commit
  8. 21 Feb, 2023 1 commit
  9. 04 Nov, 2022 1 commit
  10. 05 Oct, 2022 2 commits
    • Vincent Pelletier's avatar
      Products.ERP5.ERP5Site: Install erp5_oauth2_{resource,authentication} by default. · 035d099a
      Vincent Pelletier authored
      So every new instance is able to use self-contained oauh2 authentication.
      In turn, this triggers atomated migration of a few portal types, which
      cause the coding style tests to fail. So commit these as well.
      035d099a
    • Vincent Pelletier's avatar
      all: Implement server-side OAuth2 protocol. · 56c81642
      Vincent Pelletier authored
      Replace CookieCrumbler's cookie with OAuth2 tokens:
      - add the notion of authenticated sessions: period from a login action to
        either a logout or the expiration of tokens
      - avoids session fixation (knowing one token does not grant near-permanent
        access to the session)
      - reduces the per-request cost of authentication (removes the need to
        compute user's groups, and the need to cache these groups for a fixed
        period).
      56c81642
  11. 30 Sep, 2022 1 commit
  12. 05 Sep, 2022 1 commit
  13. 18 May, 2022 1 commit
  14. 17 May, 2022 1 commit
  15. 04 May, 2022 1 commit
    • Arnaud Fontaine's avatar
      py2/py3: Make Products code compatible with both python2 and python3. · a17bb910
      Arnaud Fontaine authored
      Done through various 2to3 fixers (zope.fixers, modernize, future) and manual
      changes. This is a single commit so that we have a clearer picture of how code
      converted with my2to3 should look like.
      
      Except straightforward @implementer decorator 2to3 fixer, only product/ folder
      was considered as the goal was to be able to create an ERP5Site.
      
      * Use @implementer decorator introduced in zope.interface 3.6.0 (2010):
      
        The implements syntax used under Python 2.X does not work under 3.X, since it
        depends on how metaclasses are implemented and this has changed. Instead it
        now supports a decorator syntax (also under Python 2.X).
      
        Applied thanks to 2to3 `zope.fixers` package.
      
      * Use `six.moves` rather than `future` install_aliases() feature because the
        latter use unicode_literals and "wraps" module aliases so that unicode() are
        returned for text rather than str() (Python2 standard library). This notably
        breaks BusinessTemplate code which uses urllib quote() for filesystem paths...
      
      * No more unbound methods in python3 so use six.get_unbound_function().
      
      * dict.(iteritems,iterkeys,itervalues)() => six.\1(dict) thanks to `dict_six`
        2to3 fixer from `modernize`:
        $ python-modernize -w -f dict_six product/
      
      * Manually make sure that dict.{items,values,keys}() returns a real list when it
        is latter modified rather than a dict_{items,values,keys} (ensure_list()). By
        default, 2to3 blindly does list(dict.{items,values,keys}()) which is not
        acceptable from performances point of view. With my2to3, this will be possible
        to handle such case automatically.
      
      * Replace cStringIO.StringIO() by six.moves.cStringIO() (a module alias for
        cStringIO.StringIO() on py2 and io.StringIO() on py3).
      
      * Use six.text_type which maps to unicode() on py2 and str() on py3. This also
        makes a clearer difference between text and binary strings.
      
      * Replace map()/filter() with lambda function by list comprehension (this has
        the benefit to avoid casting to list for py3 as it returns iterators).
      a17bb910
  16. 21 Feb, 2022 1 commit
  17. 16 Feb, 2022 1 commit
  18. 29 Apr, 2021 1 commit
  19. 23 Apr, 2021 1 commit
    • Arnaud Fontaine's avatar
      ERP5Workflow: DC Workflows are now ERP5 objects (!1378). · df85ef46
      Arnaud Fontaine authored
      This also moves all Configurator Workflows in workflow_module to portal_workflow
      (workflow_module was an implementation of Workflows based on ERP5 objects and
      not using DCWorkflow code).
      
      * Workflows are now defined on on portal_workflow._chains_by_type anymore but,
        as everything else, on the Portal Type itself.
      * portal_workflow can contain and work at the same time with legacy and new
        Workflows (ERP5Type/patches/DCWorkflow.py monkey-patching DCWorkflow classes
        to provide the same API).
      * Existing Workflow Scripts should work as they are and the code can be updated
        later on to take advantage of the new API:
        + With legacy implementation Workflow {Scripts,Transitions,Worklists,States}
          were in a Folder ({scripts,transitions,worklists,states} attribute) but
          all of these are now in the Workflow itself and their IDs are prefixed
          (PropertySheet-style), for example `script_`. Legacy attributes are
          provided in new implementation to call the new API.
        + When calling a Workflow Script, `container` was bound to its parent, namely
          WF.scripts (Folder) and a Workflow Script could call another. Now `container`
          is bound to the WF itself and Workflow Scripts are in a Workflow directly.
          New implementation `scripts` attribute handle such use case.
        + Override portal_workflow.__getattr__ so that a Workflow Script can call
          another one without prefix.
      * Worklist are Predicate: Worklist filter objects based on given criterions and
        thus it makes more sense for a Worklist to be a Predicate (albeit a Predicate
        with only Identity Criterion and nothing else).
        + Criterion Properties:
          * state_variable.
          * local_roles (SECURITY_PARAMETER_ID).
          * Any Workflow Variables with for_catalog == 1.
      
      erp5_performance_test:testWorkflowPerformance were ran to compare DCWorkflow
      and ERP5Workflow implementations and it seems to be about 4% slower with the
      new implementation (legacy: 7.547, 7.593, 7.618, 7.59, 7.514 and new: 7.842,
      7.723, 7.902, 7.837, 7.875).
      
      Work done by Wenjie Zheng, Isabelle Vallet, Sebastien Robin and myself.
      df85ef46
  20. 02 Feb, 2021 1 commit
  21. 30 Nov, 2020 1 commit
  22. 28 Oct, 2020 1 commit
  23. 02 Jul, 2020 1 commit
    • Arnaud Fontaine's avatar
      ZODB Components: Migrate Products.ERP5Type.Log from filesystem. · 48c45fbd
      Arnaud Fontaine authored
      testUpgradeInstanceWithOldDataFs: Upgrade erp5_upgrader too (it was in keep
      list until now) as old Data.fs contains ERP5UpgraderUtils Extension with import of
      Products.ERP5Type.Log. Although, erp5_upgrader should probably be automatically
      upgraded before even starting the upgrade...
      48c45fbd
  24. 23 Jun, 2020 1 commit
    • Arnaud Fontaine's avatar
      ZODB Components: Migrate Tools in Products.ERP5.Tool to erp5_core. · d2f87fd8
      Arnaud Fontaine authored
      Besides migrating Tools .py, this also moves the Tools themselves (portal_*):
       * Some of them were created before erp5_core being installed and this
         would not work anymore as their .py is now in erp5_core.
       * Some others were created after (via setupLastTool()) and this would not
         work neither as sub-objects may be installed by erp5_core.
      
      Add them to template_keep_path_list to prevent them from being re-created like
      ERP5Site.addERP5Tool() used to do (depend on 3180424b, 91393be2).
      
      Not migrated:
        * AlarmTool: Needed for upgrader.
        * CategoryTool, IdTool: Bootstrap.
        * TemplateTool, TrashTool: Business Template installation.
        * SolverTool: TypeProvider.
        * ContributionTool: Imported by Products.ERP5.Document.Document used in many places, will be done later.
        * NotificationTool: Imported by ERP5.Document.EmailDocument, will be done later.
      d2f87fd8
  25. 09 Jun, 2020 1 commit
  26. 27 Mar, 2020 1 commit
  27. 24 Mar, 2020 1 commit
  28. 09 Mar, 2020 1 commit
  29. 28 Feb, 2020 1 commit
  30. 21 Feb, 2020 5 commits
  31. 18 Feb, 2020 1 commit
  32. 10 Jan, 2020 1 commit
    • Arnaud Fontaine's avatar
      ERP5Site: Do not override newContent() but use FolderMixIn implementation to... · ed81a3d4
      Arnaud Fontaine authored
      ERP5Site: Do not override newContent() but use FolderMixIn implementation to have a consistent behavior.
      
      ERP5Site was raising error when ID or portal_type was not passed but there is
      no reason to do so (as it is done in FolderMixIn.newContent()). This allows
      calling ERP5Site.newContent(temp_object=True) without ID, likewise Folder.
      ed81a3d4
  33. 04 Oct, 2019 1 commit
    • Arnaud Fontaine's avatar
      ZODB Components: Properly handle addition of template_* properties in... · d9627917
      Arnaud Fontaine authored
      ZODB Components: Properly handle addition of template_* properties in BusinessTemplate PropertySheet.
      
      On the plus side, this avoids an ugly 'except AttributeError: pass' which does
      not work anyway with the scenario below.
      
      Assuming the following:
        * template_XXX Property (accessor: getTemplateXXX) recently added to BusinessTemplate PropertySheet.
        * erp5_YYY sets template_A Property (erp5_YYY/bt/template_XXX.xml).
        This commit handles the following:
          1. Stop instance with old ERP5 without template_XXX.
          2. Update erp5.git.
          3. Start instance.
          4. Upgrade erp5_property_sheets and erp5_YYY bt5s in *one* transaction from portal_templates UI.
          => When upgrading erp5_YYY, BusinessTemplate.importFile() imports erp5_YYY/bt/*.xml where the
             list of files is based on BusinessTemplate class propertyMap(), but at this point accessors
             have not been re-generated yet, thus template_XXX is not returned by propertyMap() and
             erp5_YYY/bt/template_XXX.xml is not imported.
             => portal_templates/erp5_YYY new BT does not have template_XXX property set at all.
      d9627917