Skip to content

Commit 55c9402

Browse files
committed
add working (though no-op) PostModerationRecordPolicy
1 parent e851cf9 commit 55c9402

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

app/controllers/thredded/moderation_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def history
2121
.send(Kaminari.config.page_method_name, current_page)
2222
.preload(:messageboard, :post_user, :moderator, post: :postable)
2323
.preload_first_topic_post
24+
authorize @post_moderation_records
2425
end
2526

2627
def activity
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# frozen_string_literal: true
2+
3+
module Thredded
4+
class PostModerationRecordPolicy
5+
def initialize(user, scope)
6+
@user = user
7+
@scope = scope
8+
end
9+
10+
def history?
11+
true
12+
end
13+
end
14+
end

0 commit comments

Comments
 (0)