1. 10 Sep, 2019 9 commits
    • Jérome Perrin's avatar
      ZSQLCatalog: use _getProperty to skip security checks · 16aa6134
      Jérome Perrin authored
      During indexation we don't apply security checks, so this should be a
      little bit faster.
      
      With this change _getProperty becomes a more "official" API, so some
      small changes had to be made to classes which do not inherits from
      Products.ERP5Type.Base.Base, so that they also implements _getProperty:
       - for ERP5Site we simply use getProperty
       - for the test class from testERP5Catalog, the change is a bit more
      important, because this class never defined getProperty, so during that
      test we were just acquiring a getProperty from portal.
      16aa6134
    • Jérome Perrin's avatar
      ERP5Type: micro-optimize edit/getProperty · 096679ba
      Jérome Perrin authored
      Optimize edit by calculating the set of restricted accessors only once
      at class generation instead of calculating it each call.
      Optimize edit by using the same technique to decide if getattr or
      guarded_getattr has to be used to get the property.
      
      TempBase had to be special-cased to keep compatibility with some
      existing usages of calling TempBase.edit(modification_date=...) where
      somewhere in CMF classes a protected setModificationDate exists. Instead
      of rewriting existing cases to use something lighter (why do we need
      TempBase anyway ?), we do minimal compatibility fix for TempBase only.
      
      Reuse the INFINITE_SET from matrix after moving it to a shared place,
      since this is also useful here.
      096679ba
    • Jérome Perrin's avatar
    • Jérome Perrin's avatar
    • Jérome Perrin's avatar
    • Jérome Perrin's avatar
      ui_test: Make protected properties testable · eefaa8b3
      Jérome Perrin authored
      - introduce protected property (ie. with a specific "read permission" / "write permission" ) on Foo
      - add a Foo_viewSecurity which displays this protected property
      eefaa8b3
    • Jérome Perrin's avatar
      ERP5Type: use constraints accessors in _filteredConstraintList · 8f26efd8
      Jérome Perrin authored
      Constraints are supposed to have a getReference and getConstraintType
      methods.
      8f26efd8
    • Jérome Perrin's avatar
      ERP5Type: make PropertyManager.getProperty support `checked_permission` argument · e6d8de91
      Jérome Perrin authored
      for compatibility with Base.checkProperty.
      e6d8de91
    • Jérome Perrin's avatar
      ERP5Type: honor read_property in Base.getProperty · fc54073a
      Jérome Perrin authored
      This introduce a `_getProperty` method that's not really part of public
      API, but could be called to get a property without security check.
      Because some classes were already using internally a _getProperty method
      for a different meaning, these methods have been renamed.
      
      This also re-enable parts of test_PropertySheetSecurityOnAccessors that
      are supposed to work (security is checked on accessors) and split
      what's currently not supposed to work (security on accessors does not
      work in the corner case of using the default read permission, 'Access
      contents information' as a write permission) to another expected failure
      test.
      fc54073a
  2. 02 Sep, 2019 1 commit
  3. 16 Aug, 2019 5 commits
  4. 15 Aug, 2019 7 commits
  5. 13 Aug, 2019 4 commits
  6. 09 Aug, 2019 8 commits
  7. 08 Aug, 2019 3 commits
  8. 07 Aug, 2019 2 commits
  9. 06 Aug, 2019 1 commit