diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-10-28 00:48:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-28 00:48:30 +0200 |
commit | 07cc201accd4a04c8c11cda21eecded4e7875d55 (patch) | |
tree | b93b9e426549f88ef79cdf90bca15b0bc9596bb9 /app/models/trends | |
parent | 8ae0936ddd92eadb519c0440aae3961fcd820106 (diff) |
Fix using wrong policy on status-related actions in admin UI (#19490)
Diffstat (limited to 'app/models/trends')
-rw-r--r-- | app/models/trends/status_batch.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/trends/status_batch.rb b/app/models/trends/status_batch.rb index 78d93bed4..f9b97b224 100644 --- a/app/models/trends/status_batch.rb +++ b/app/models/trends/status_batch.rb @@ -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 |