-
- Downloads
Partially rollback changes to `$userID`. Merely lay groundwork for future update.
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.
Showing
- CRM/Contact/AccessTrait.php 2 additions, 2 deletionsCRM/Contact/AccessTrait.php
- CRM/Core/BAO/CustomValue.php 3 additions, 3 deletionsCRM/Core/BAO/CustomValue.php
- CRM/Core/DynamicFKAccessTrait.php 2 additions, 2 deletionsCRM/Core/DynamicFKAccessTrait.php
- Civi/API/Event/AuthorizeEvent.php 9 additions, 0 deletionsCivi/API/Event/AuthorizeEvent.php
- Civi/API/Kernel.php 1 addition, 1 deletionCivi/API/Kernel.php
- Civi/Api4/Event/ActiveUserTrait.php 43 additions, 0 deletionsCivi/Api4/Event/ActiveUserTrait.php
- Civi/Api4/Event/AuthorizeRecordEvent.php 5 additions, 21 deletionsCivi/Api4/Event/AuthorizeRecordEvent.php
- Civi/Api4/Generic/AbstractAction.php 3 additions, 4 deletionsCivi/Api4/Generic/AbstractAction.php
- Civi/Api4/Generic/AbstractCreateAction.php 1 addition, 1 deletionCivi/Api4/Generic/AbstractCreateAction.php
- Civi/Api4/Generic/AbstractSaveAction.php 1 addition, 1 deletionCivi/Api4/Generic/AbstractSaveAction.php
- Civi/Api4/Generic/BasicBatchAction.php 1 addition, 1 deletionCivi/Api4/Generic/BasicBatchAction.php
- Civi/Api4/Generic/BasicUpdateAction.php 1 addition, 1 deletionCivi/Api4/Generic/BasicUpdateAction.php
- Civi/Api4/Generic/CheckAccessAction.php 2 additions, 2 deletionsCivi/Api4/Generic/CheckAccessAction.php
- Civi/Api4/Generic/DAODeleteAction.php 1 addition, 1 deletionCivi/Api4/Generic/DAODeleteAction.php
- Civi/Api4/Generic/DAOUpdateAction.php 2 additions, 2 deletionsCivi/Api4/Generic/DAOUpdateAction.php
- Civi/Api4/Utils/CoreUtil.php 7 additions, 7 deletionsCivi/Api4/Utils/CoreUtil.php
- api/v3/Contribution.php 1 addition, 1 deletionapi/v3/Contribution.php
- ext/oauth-client/Civi/Api4/Action/OAuthContactToken/OnlyModifyOwnTokensTrait.php 4 additions, 3 deletions...pi4/Action/OAuthContactToken/OnlyModifyOwnTokensTrait.php
Loading
Please register or sign in to comment