about summary refs log tree commit diff
path: root/app/policies
diff options
context:
space:
mode:
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/delivery_policy.rb15
-rw-r--r--app/policies/follow_recommendation_policy.rb15
2 files changed, 30 insertions, 0 deletions
diff --git a/app/policies/delivery_policy.rb b/app/policies/delivery_policy.rb
new file mode 100644
index 000000000..24d06c168
--- /dev/null
+++ b/app/policies/delivery_policy.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class DeliveryPolicy < ApplicationPolicy
+  def clear_delivery_errors?
+    admin?
+  end
+
+  def restart_delivery?
+    admin?
+  end
+
+  def stop_delivery?
+    admin?
+  end
+end
diff --git a/app/policies/follow_recommendation_policy.rb b/app/policies/follow_recommendation_policy.rb
new file mode 100644
index 000000000..68cd0e547
--- /dev/null
+++ b/app/policies/follow_recommendation_policy.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class FollowRecommendationPolicy < ApplicationPolicy
+  def show?
+    staff?
+  end
+
+  def suppress?
+    staff?
+  end
+
+  def unsuppress?
+    staff?
+  end
+end