1. 03 Sep, 2020 2 commits
    • Jérome Perrin's avatar
      corporate_identity_test: adjust test for new "Export as Chapter" action · 65dc3807
      Jérome Perrin authored
      Since 206a8e25 (erp5_officejs: new OfficeJS Slideshow Editor application,
      2020-07-06) this test runs with erp5_run_my_doc installed, and the first export
      action for Web Page is no longer "Export as SlideShow" but "Export as Chapter".
      This is an action which is here since a long time in erp5_run_my_doc, but since
      erp5_run_my_doc was not installed in this test it was not impacting this test.
      
      Adjust the tests so that they don't assume that the first export action is
      "Export as SlideShow" but are more independent on which is the first action.
      
      Also, all actions have a new index, so places where we select the action by
      index no longer work. Instead of updating the indexes, select by label which
      should be more future proof.
      65dc3807
    • Nicolas Wavrant's avatar
      erp5_web_renderjs_ui: try to get a more precise float value on all platforms · ce233f79
      Nicolas Wavrant authored
      Mathematically, 1/(x^y) is the same as x^-y, and despite float caculation the results is usually precise enough :
      > Math.pow(10, -5)
      0.00001
      I tested this on few platforms : firefox 68.12, firefox 77.0, node v10.19.0
      
      Unfortunately on (recent ?) chromes :
      > Math.pow(10, -5)
      0.000009999999999999999
      Which is a horrible value to use as step (and it prevents the form submission as most floats the user will enter won't match the init value * x * the step.
      
      For an unknown reason, I get a more consistent result using the formula "1 / Math.pow(10, 5)", which returns 0.00001 on all tested platforms.
      
      If we find more issues in the future, we maybe should try building the step using strings. Using strings for manipulating floats is in reality widespread, and many languages do so to round floats (ie: https://github.com/python/cpython/blob/4a97b1517a6b5ff22e2984b677a680b07ff0ce11/Objects/floatobject.c#L925)
      
      The precision of 5 is not random-picked, it is the minimum precision needed to manipulate prices for currencies with 2 digits, like euros.
      ce233f79
  2. 02 Sep, 2020 15 commits
  3. 01 Sep, 2020 9 commits
  4. 31 Aug, 2020 8 commits
    • Vincent Pelletier's avatar
      synchronizeDynamicModules: Flush ZODB cache. · e5cb7960
      Vincent Pelletier authored
      Should fix most of the cases where reloading components cause breakage.
      There is still a race condition between a transaction's cache being
      actually flushed (which can only happen at transaction boundaries) and
      another transaction doing the actual class reload, which will
      immediately affect all the started transactions in the same process.
      e5cb7960
    • Jérome Perrin's avatar
      testDynamicClassGeneration: check broken dynamic classes can be repaired · 1f69c0d7
      Jérome Perrin authored
      Once a portal type class became available again, instances of this classes
      should no longer be broken and can be modified again
      1f69c0d7
    • Jérome Perrin's avatar
      testDynamicClassGeneration: explicitly create a Base Type in test · c7239458
      Jérome Perrin authored
      Some other types (Gadget Type) are currently lacking the interaction workflow
      which resets the dynamic classes.
      c7239458
    • Jérome Perrin's avatar
    • Jérome Perrin's avatar
      base: ensure migrated persons have a user_id · bc67c2c4
      Jérome Perrin authored
      Persons created before the introduction of ERP5 Login and user_id will only
      have a user_id after migration if they were already user before migration,
      otherwise they will not have a user_id and creating assignments and ERP5 Login
      for this person creates a user which can not log in the system.
      
      To make it possible for these persons to login anyway, we ensure person has a
      user id when validating a login
      bc67c2c4
    • Jérome Perrin's avatar
      base: restrict changing a user id · 45d16764
      Jérome Perrin authored
      while setting an initial user id should be allowed for any user which can
      create a person, changing an already set user id can have security
      implications, so we protect it with a more strict permission
      45d16764
    • Jérome Perrin's avatar
      core: display login in caption · b9cdfb58
      Jérome Perrin authored
      user_id are technical things that should not be displayed to users.
      
      In the case of tokens, for now we show "something that's not user id / not the
      token secret". That's not ideal but as far as I know whe don't really have use
      cases of tokens to show a page where user caption would be displayed.
      b9cdfb58
    • Jérome Perrin's avatar
      Fix issues with Person.setUserId unicity check · d87bda30
      Jérome Perrin authored
      Person.setUserId is heavy, it serializes person module to prevent concurrency,
      but in some cases we the risk of having duplicate user ids is under control, so
      we don't want to pay the performance price.
      
      See merge request !1242
      d87bda30
  5. 27 Aug, 2020 1 commit
  6. 26 Aug, 2020 1 commit
  7. 25 Aug, 2020 3 commits
  8. 24 Aug, 2020 1 commit