about summary refs log tree commit diff
path: root/app/policies/status_policy.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-10-26 13:42:29 +0200
committerGitHub <noreply@github.com>2022-10-26 13:42:29 +0200
commitf8ca3bb2a1dd648f41e8fea5b5eb87b53bc8d521 (patch)
tree442181ac32f6c8a9601619aa9c94635c09fc02ce /app/policies/status_policy.rb
parentdee69be60ef72f714ca3cbbd47e83f1015332f06 (diff)
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
Diffstat (limited to 'app/policies/status_policy.rb')
-rw-r--r--app/policies/status_policy.rb12
1 files changed, 2 insertions, 10 deletions
diff --git a/app/policies/status_policy.rb b/app/policies/status_policy.rb
index 2f48b5d70..f3d0ffdba 100644
--- a/app/policies/status_policy.rb
+++ b/app/policies/status_policy.rb
@@ -7,10 +7,6 @@ class StatusPolicy < ApplicationPolicy
     @preloaded_relations = preloaded_relations
   end
 
-  def index?
-    role.can?(:manage_reports, :manage_users)
-  end
-
   def show?
     return false if author.suspended?
 
@@ -32,17 +28,13 @@ class StatusPolicy < ApplicationPolicy
   end
 
   def destroy?
-    role.can?(:manage_reports) || owned?
+    owned?
   end
 
   alias unreblog? destroy?
 
   def update?
-    role.can?(:manage_reports) || owned?
-  end
-
-  def review?
-    role.can?(:manage_taxonomies)
+    owned?
   end
 
   private