Skip to content

Conversation

@duncanmcclean
Copy link
Member

@duncanmcclean duncanmcclean commented Jul 15, 2024

This pull request implements various events, for some non-content related actions which are missing events for auditing purposes:

  • ImpersonationStarted and ImpersonationEnded events
    • These events will be dispatched whenever a user starts or finishes impersonating another user. Both the $impersonator and the $impersonated users are available in the event.
  • StacheCleared
    • This event will be dispatched after the Stache cache has been cleared, either via the php please stache:clear command or via the Cache Manager utility.
  • StacheWarmed
    • This event will be dispatched after the Stache cache has been warmed, either via the php please stache:warm command or via the Cache Manager utility.
  • StaticCacheCleared
    • This event will be dispatched after the Static cache has been cleared, via the php please static:clear command or via the Cache Manager utility.
  • GlideCacheCleared
    • This event will be dispatched after the Glide cache has been cleared, either via the php please glide:clear command or via the Cache Manager utility.
  • SearchIndexUpdated
    • This event will be dispatched when a search index is updated, either via the php please search:update command or via the Search utility.
    • The $index instance is available on the event.
  • UserPasswordChanged
    • This event will be dispatched when the password of another user is changed via the Control Panel.
    • This event won't be dispatched when a user's password is "reset" via the CP authentication pages, or via the {{ user:reset_password_form }} tag. In this case, Laravel's PasswordReset event would be dispatched.
  • LicenseSet
    • This event will be dispatched after a license key has been set via the php please license:set command.
    • This event won't be dispatched when the license key is manually added to a site's .env file.
  • LicensesRefreshed

As a note, this PR doesn't implement an event for when Laravel's application cache is cleared via the Cache Manager utility as Laravel provides its own cache:cleared event for this purpose.

Closes: #10403
Related: #10460

Copy link
Member

@jasonvarga jasonvarga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lookin' good

@johncarter-
Copy link
Contributor

Useful stuff. Thanks.

@jasonvarga jasonvarga merged commit 0d42934 into 5.x Jul 16, 2024
@jasonvarga jasonvarga deleted the more-events branch July 16, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More Events

4 participants