[Sprint/PinkPanther](fix): Stripping out blog body upon export.
Closes #1916 (closed)
Summary
Blog paywalls are broken, it shows the text when you access the page, even if it should be behind a paywall
Solution
$this->_eventsDispatcher->trigger('export:extender', 'blog', [ 'entity' => $this ], [])
is not being triggered as was intended, it appears that it is not registered correctly at, as the EventDispatcher never sees it.
https://gitlab.com/minds/engine/blob/master/Core/Wire/Paywall/Events.php#L70 is not used by any other classes, so the solution I believe is to move the code into the blog namespace.
From left to right
- 1 - Owner account.
- 2 - Not logged in.
- 3 - Other account.
To test
- Make a blog, put it behind a paywall
- Check you can view the content on the owner account.
- Check that you cannot access the content when logged out.
- Check that you cannot access the content when on a secondary account that has not wired tokens previously to your primary.
- Pay for the blog on that account, and verify you can access it (if you need some, drop me a message).
Edited by Ben