Fix using wrong policy on status-related actions in admin UI (#19490)
This commit is contained in:
1 parent
8ae0936ddd
commit
07cc201acc
2 files changed
+4
-4
No files matched your search
@@ -30,7 +30,7 @@ class Trends::StatusBatch
|
||||
end
|
||||
|
||||
def approve!
|
||||
statuses.each { |status| authorize(status, :review?) }
|
||||
statuses.each { |status| authorize([:admin, status], :review?) }
|
||||
statuses.update_all(trendable: true)
|
||||
end
|
||||
|
||||
@@ -45,7 +45,7 @@ class Trends::StatusBatch
|
||||
end
|
||||
|
||||
def reject!
|
||||
statuses.each { |status| authorize(status, :review?) }
|
||||
statuses.each { |status| authorize([:admin, status], :review?) }
|
||||
statuses.update_all(trendable: false)
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user