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.
18 files changed: