1. 01 May, 2017 3 commits
    • Jérome Perrin's avatar
      Lower priority of mass workflow transition activity · f88d9684
      Jérome Perrin authored
      We had an incident in a in instance were a user changed state of 70K invoices using https://www.erp5.com/howto/erp5-developer-howto/erp5-HowTo.Change.Workflow.State.Of.Multiple.Documents  and leads to user not receiving the reports they requested.
      
      `Folder_modifyWorkflowStatus` creates a lot of `callMethodOnObjectList` activities (for all the selected documents) with priority 2, then these activities will cause more reindex an expand activities.
      
      Until all these `callMethodOnObjectList` are processed, no new activities with priority > 2 were processed. Some "important for users" activities such as erp5_deferred_style reports where waiting in the queue.
      
      I believe we should just set a lower priority to these `callMethodOnObjectList`, eventhough I considered a more clever way of giving the priority:
      
       - if the number of selected documents is reasonably small, process them with a very high priority, this way the user can see his document changing state almost immediately as when using the synchronous change state. This should not cause congestion because there are not too many documents.
       - when there are a lot of selected documents, process them with a very low priority, because anyway it will take time and user will not "wait" for documents to change state.
      
      ... but I realized this is trying to be too clever.
      
      So any objections to just lower priority here ?
      
      /reviewed-on !235
      f88d9684
    • Jérome Perrin's avatar
      Support arbitrary email headers · cb9d0c70
      Jérome Perrin authored
      As discussed in  !248 this approach allows to set any mail header.
      
      I also included a not so related patch of email header handlings 88d40b40 so that we review all this together.
      
      /cc @gabriel @kazuhiko 
      
      /reviewed-on !256
      cb9d0c70
    • Jérome Perrin's avatar
      Enable erp5 login user manager in post_upgrade · 8a27134c
      Jérome Perrin authored
      I just simulated an upgrade for an ERP5 running a version from before !185,  `ERP5UserManager Non Existence_constraint` properly disabled old `acl_users/erp5_users` and migrated all persons, but  `ERP5UserLoginManager Existence_constraint` did not activate `acl_users/erp5_login_users`.
      
      This is because  `ERP5UserLoginManager Existence_constraint` is registered as a **pre-upgrade** constraint, but with my upgrade scenario, pre-upgrade constraint are installed too late. 
      
      The upgrade scenario was:
      
       1. install new ERP5 SR on slapos
       2. manually install new versions of  erp5_upgrader and customer_configuration_upgrader business template
       3. run upgrade ( sense then fix on portal_alarms/promise_check_upgrade )
      
      During step 3, when pre-upgrade constraints are executed, erp5_base is not installed yet, so  `ERP5UserLoginManager Existence_constraint` can not run because it's not installed yet. 
      
      My suggestion is to change it to a post-upgrade constraint.
      
      If I understand correctly and my upgrade scenario is really the supported one, it means we can only have pre-upgrade constraints in erp5_upgrader.
      
      ( I also fix a meaningless typo in the same code)
      
      /cc @kazuhiko  @vpelletier @seb @gabriel 
      
      /reviewed-on !262
      8a27134c
  2. 28 Apr, 2017 2 commits
  3. 27 Apr, 2017 1 commit
  4. 25 Apr, 2017 2 commits
  5. 24 Apr, 2017 1 commit
    • Vincent Pelletier's avatar
      ERP5Security.ERP5UserLoginManager: Special-case user_id='System Processes' · 17d3df41
      Vincent Pelletier authored
      Because of ERP5Type.UnrestrictedMethod, 'System Processes' can own objects.
      Such objects can be proxy-role'd scripts, and proxy-role mechanism
      triggers many users look-ups (each time security is evaluated, which is
      virtually every getattr). Each such lookup will do a query for 'System
      Processes' user, which will (hopefully) find nothing anyway.
      So special-case 'System Processes' when looking by user_id by skipping
      the search altogether (enforcing the inability to locate this user,
      consistently with Zope assumptions, and consistently with previous
      behaviour).
      17d3df41
  6. 21 Apr, 2017 4 commits
  7. 20 Apr, 2017 14 commits
  8. 19 Apr, 2017 2 commits
  9. 18 Apr, 2017 11 commits