server icon indicating copy to clipboard operation
server copied to clipboard

Move admin_audit hooks to proper event listeners

Open tcitworld opened this issue 2 years ago • 4 comments

Requires #35677

Summary

Moves all of the hooks used by admin_audit to event listeners, where appropriate typed events already exist.

  • Bases itself on #35677 to have app management events
  • Adds a new ConsoleEventV2 typed event to replace the legacy ConsoleEvent event in OCP (already depreciated). However, this doesn't seem used anywhere else, so we could replace it straight away.
  • Adds preview details on the BeforePreviewFetchedEvent event

Part of #14552. Follow #37194 to track all of the hooks left.

TODO

  • [ ] Add tests for the new listeners

Checklist

tcitworld avatar Mar 13 '23 10:03 tcitworld

See https://github.com/nextcloud/server/issues/32128 as well

come-nc avatar Mar 13 '23 15:03 come-nc

Is that different/better than https://github.com/nextcloud/server/pull/32019 ?

come-nc avatar Mar 13 '23 15:03 come-nc

I missed this one, thanks. :see_no_evil:

Well, there's more stuff in mine. I'll simply take the LDAP stuff from Carl's PR, and take over https://github.com/nextcloud/server/pull/32018 as well.

tcitworld avatar Mar 13 '23 16:03 tcitworld

Please strict type the hell out of this, return types on all new methods and strict_type declare on all new files, otherwise nice cleanup!

come-nc avatar Mar 14 '23 17:03 come-nc