Skip to content
Snippets Groups Projects
  1. Oct 12, 2021
  2. Oct 05, 2021
  3. Oct 03, 2021
  4. Oct 01, 2021
  5. Sep 30, 2021
  6. Sep 24, 2021
  7. Aug 25, 2021
  8. Aug 24, 2021
  9. Aug 23, 2021
  10. Aug 20, 2021
  11. Aug 18, 2021
  12. Aug 15, 2021
  13. Aug 11, 2021
  14. Jul 30, 2021
  15. Jul 21, 2021
  16. Jul 20, 2021
  17. Jul 13, 2021
  18. Jul 07, 2021
  19. Jul 06, 2021
  20. Jul 05, 2021
  21. Jul 04, 2021
    • Eileen McNaughton's avatar
      Improve api consistency on custom field creation · 9ccfced4
      Eileen McNaughton authored
      Api supports a key 'option_values' by always setting the 'magic' param
      option_type to 1. v4 doesn't - but creating option values when creating
      a custom field is desirable. This fixes so that the form still
      'opts out' if it passes in '2' but otherwise we create the option values
      if passed in.
      
      Just a teensy bit less magic in the api layer & bao
      9ccfced4
  22. Jul 03, 2021
    • Eileen McNaughton's avatar
      [REF] Move membership date calc from v3 api to BAO · 7670664e
      Eileen McNaughton authored
      This moves code to calculate membership dates for new memberships from the
      v3 api Membership.create and the batch entry membership form to the membership bao.
      
      I think more cleanup could follow this - in the api most obviously and
      the BAO is a bit insane still
      
      This has test cover in the v3 api membership test and in
      CRM_Batch_Form_EntryTest
      7670664e
  23. Jul 01, 2021
  24. Jun 30, 2021
  25. Jun 22, 2021
  26. Jun 18, 2021
  27. Jun 15, 2021
    • Eileen McNaughton's avatar
      Fix unreleased api change · e376b300
      Eileen McNaughton authored
      An unreleased change adds the entity ids for membership to the return values.
      
      However, on digging into further cleanup I realised that the entity ids are in
      the line item array, along with other values which may or may not be useful,
      and it's cleaner, more complete and more maintainable to return the line_items.
      
      It requires an extra foreach loop in the calling code but
      I don't see that as a downside.
      
      We should change this in the rc so what is released is consistent
      
      Test cover in testSubmitRecur & other tests in CRM_Member_Form_MembershipTest
      e376b300
    • colemanw's avatar
      APIv4 - Add filter for entity tags · a6d0f90f
      colemanw authored
      a6d0f90f
  28. Jun 09, 2021
    • colemanw's avatar
      REF - Cleanup array key checking to use array_key_exists · c3f7ab62
      colemanw authored
      Before: in_array($foo, array_keys($bar))
      After: array_key_exists($foo, $bar)
      c3f7ab62
    • totten's avatar
      Partially rollback changes to `$userID`. Merely lay groundwork for future update. · 70da3927
      totten authored
      Context: AuthorizeEvent did not allow tracking userID.  AuthorizeRecordEvent
      is spec'd to track userID.  This is a step toward supporting checks when the
      target user is non-present (ie not the user in the browser/session).
      However, this step is not *sufficient* - additional work is also needed to
      support non-present users.
      
      Original: AuthorizeEvent and AbstractAction::isAuthorized did not report
      current userID.  However, the wiring for AuthorizeRecordEvent is spec'd
      to allow userID.
      
      Previous: Made a breaking change in the signature of
      AuthorizeEvent/AbstractAction::isAuthorized() to report userID.  However,
      even with the break, it's not clear if this is the best approach.
      
      Revised:
      * Both AuthorizeEvent and AuthorizeRecordEvent report `userID`. This allows consumers to start using
        this information -- laying the groundwork for future changes.
      * If an existing event-consumer ignores the `userID`, it will still work as correctly as before. This is
        because we guarantee that the userID matches the session-user.
      * The signature of `AbstractAction::isAuthorized()` matches its original. No BC break. However, the method
        is flagged `@internal` to warn about the prospect of future changes.
      * In the future, after we do more legwork on to ensure that the overall
        system makes sense, we may flip this and start doing non-present users.
      70da3927
  29. Jun 08, 2021
    • totten's avatar
      (REF) Isolate calls to $bao::checkAccess. Prefer CoreUtil::checkAccessDelegate. · 6ea81ac6
      totten authored
      Code paths:
      
      * Before: There are many callers to `$bao::checkAccess()`.
      * After: There is only one caller to `$bao::checkAccess()` (ie `CoreUtil`).
      
      Delegation mechanics:
      
      * Before: When delegating access-control to another entity, various things invoke  `$bao::checkAccess()`.
      * After: When delegating access-control to another entity, various things invoke `CoreUtil::checkAccessDelegated()`
      6ea81ac6
  30. Jun 07, 2021
    • eileen's avatar
      Add BAO function and hook for checkAccess · 9cef6066
      eileen authored and totten's avatar totten committed
      This adds a static ::checkAccess function to all BAOs, which dispatches to
      a protected _checkAccess function in that BAO, as well as a new hook:
      hook_civicrm_checkAccess($entity, $action, $record, $contactID, &$granted)
      9cef6066
  31. Jun 04, 2021
Loading