1. 16 Oct, 2018 1 commit
    • Jérome Perrin's avatar
      Support Request App · 25e965c3
      Jérome Perrin authored
      Assorted fixes and new features for support request app:
      
      Features
       * post are now HTML and use the preferred editor ( CKEditor by default )
       * posts are ingested in Web Message and the app uses same data model as erp5_crm ( so it is able to display support request created with "standard" ERP5 interfaces)
       * date of post uses momentjs relative time (New message by Bob 1 hour ago...)
      
      Bug fixes:
       * post API no longer use proxy roles / immediate reindex
       * RSS was re-implemented to list events. The previous approach of listing support requests had an issue that the date of new posts was still the date of the original support request.
       * attached files to the "submit new support request" dialog where not uploaded
       * using a handlebars template we prevent html injection / XSS 
       * increased test coverage
      
      /reviewed-on nexedi/erp5!769
      25e965c3
  2. 15 Oct, 2018 1 commit
    • Vincent Pelletier's avatar
      CMFActivity: Do not use offset for scanning messages to validate. · a42da4de
      Vincent Pelletier authored
      This was inefficient for two reasons:
      - any message we could validate during current iteration means a message we
        did not consider is now in the range we just scanned. And it will not be
        considered until validation node starts over and scan this same range
        again.
      - "LIMIT x,1000" pattern on >1000 messages causes a quick-growing number of
        extra rows scanned by the SQL database just to skip the "x" first rows:
        at 2000 rows present it must scan 1000 + 2000 = 3000 rows for a complete
        loop over all pending activities. At 3k rows it must scan 6k rows.
        At 4k, 10k.
        While this is an overestimation (some rows should be possible to
        validate, so these would be scanned once only), this overhead grows so
        large that this overestimation can become negligible.
      
      Instead, use a range condition consistent with query's "SORT ON", which is
      already efficiently materialised by an index: SQL database just has to
      dive into the existing index to start just above the last message from
      previous iteration, and resume scanning from there, solving both issues
      listed above.
      a42da4de
  3. 12 Oct, 2018 2 commits
    • Vincent Pelletier's avatar
      ERP5Type: Patch AccessControl.owner.Owned.getWrappedOwner . · ea56fe72
      Vincent Pelletier authored
      This method is called on every __getattr__ (guarded_getattr, actually) of
      every restricted python scripts. Which means each "." in the code triggers:
      - traversal to relevant acl_user folder
      - a user lookup
      just to get the same value throughout the execution of a script (as its
      owner does not change during execution).
      Also, in practice we have extremely few possible owners: very few users are
      allowed to edit code in an ERP5 instance, and if such instance is managed
      using the upgrader alarms, they will even further reduce this owner set to
      System Processes only.
      On a real-world web page rendering, this reduces the total number of
      traversal calls from 1500 to 1100, getting rid of the two hottest spots:
      /acl_users and /$site_id/acl_users .
      ea56fe72
    • Tristan Cavelier's avatar
  4. 11 Oct, 2018 19 commits
  5. 10 Oct, 2018 3 commits
  6. 09 Oct, 2018 13 commits
  7. 08 Oct, 2018 1 commit