Ticket/12518 Add events to overwrite the allow edit and delete conditions

https://tracker.phpbb.com/browse/PHPBB3-12518