Martin Brennan 93a8e34f47
FIX: Allow user to recover/delete post if they can review the topic (#10273)
To reproduce the initial issue here:

1. A user makes a post, which discourse-akismet marks as spam (I cheated and called `DiscourseAkismet::PostsBouncer.new.send(:mark_as_spam, post)` for this)
2. The post lands in the review queue
3. The category the topic is in has a `reviewable_by_group_id`
4. A user in that group goes and looks at the Review queue, decides the post is not spam, and clicks Not Spam
5. Weird stuff happens because the `PostDestroyer#recover` method didn't handle this (the user who clicked Not Spam was not the owner of the post and was not a staff member, so the post didn't get un-destroyed and post counts didn't get updated)

Now users who belong to a group who can review a category now have the ability to recover/delete posts fully.
2020-07-22 11:57:16 +10:00
..
2020-05-05 13:46:57 +10:00
2020-05-05 13:46:57 +10:00
2020-01-15 11:27:12 +01:00
2020-04-30 16:48:53 +10:00
2020-06-15 10:05:22 +08:00
2019-10-21 12:08:20 +01:00
2020-05-05 13:46:57 +10:00
2019-05-22 17:39:44 +03:00
2020-05-05 13:46:57 +10:00
2020-05-05 13:46:57 +10:00
2020-07-21 15:55:03 +08:00
2020-04-30 16:48:53 +10:00