about summary refs log tree commit diff
path: root/app/policies
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-12-18 11:44:54 +0100
committerClaire <claire.github-309c@sitedethib.com>2021-12-18 11:44:54 +0100
commitd4f315f3044f69dfe64fbfd2348fcaa5deb2aa5e (patch)
treee3684038c30aef2dd3a0c9b5ec76de83e043663c /app/policies
parent7efef7db9ed6f7b25a28166c1b75a28adbaf7cdb (diff)
parent76761d5fc0886e44a7a6eb94ab62aae8204d9e6e (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/account_policy.rb4
-rw-r--r--app/policies/instance_policy.rb4
2 files changed, 8 insertions, 0 deletions
diff --git a/app/policies/account_policy.rb b/app/policies/account_policy.rb
index 672e1786b..46237e45c 100644
--- a/app/policies/account_policy.rb
+++ b/app/policies/account_policy.rb
@@ -64,4 +64,8 @@ class AccountPolicy < ApplicationPolicy
   def memorialize?
     admin? && !record.user&.admin? && !record.instance_actor?
   end
+
+  def unblock_email?
+    staff?
+  end
 end
diff --git a/app/policies/instance_policy.rb b/app/policies/instance_policy.rb
index a73823556..801ca162e 100644
--- a/app/policies/instance_policy.rb
+++ b/app/policies/instance_policy.rb
@@ -8,4 +8,8 @@ class InstancePolicy < ApplicationPolicy
   def show?
     admin?
   end
+
+  def destroy?
+    admin?
+  end
 end