Move admin_audit hooks to proper event listeners
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
ConsoleEventV2typed event to replace the legacyConsoleEventevent in OCP (already depreciated). However, this doesn't seem used anywhere else, so we could replace it straight away. - Adds preview details on the
BeforePreviewFetchedEventevent
Part of #14552. Follow #37194 to track all of the hooks left.
TODO
- [ ] Add tests for the new listeners
Checklist
- Code is properly formatted
- Sign-off message is added to all commits
- [ ] Tests (unit, integration, api and/or acceptance) are included
- [ ] Screenshots before/after for front-end changes
- [ ] Documentation (manuals or wiki) has been updated or is not required
- [ ] Backports requested where applicable (ex: critical bugfixes)
See https://github.com/nextcloud/server/issues/32128 as well
Is that different/better than https://github.com/nextcloud/server/pull/32019 ?
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.
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!