Add ability to view previous edits of a status in admin UI (#19462)
* Add ability to view previous edits of a status in admin UI * Change moderator access to posts to be controlled by a separate policy
This commit is contained in:
parent
dee69be60e
commit
f8ca3bb2a1
16 changed files with 232 additions and 55 deletions
|
@ -3,7 +3,6 @@
|
|||
class Admin::StatusFilter
|
||||
KEYS = %i(
|
||||
media
|
||||
id
|
||||
report_id
|
||||
).freeze
|
||||
|
||||
|
@ -28,12 +27,10 @@ class Admin::StatusFilter
|
|||
|
||||
private
|
||||
|
||||
def scope_for(key, value)
|
||||
def scope_for(key, _value)
|
||||
case key.to_s
|
||||
when 'media'
|
||||
Status.joins(:media_attachments).merge(@account.media_attachments.reorder(nil)).group(:id).reorder('statuses.id desc')
|
||||
when 'id'
|
||||
Status.where(id: value)
|
||||
else
|
||||
raise "Unknown filter: #{key}"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue