about summary refs log tree commit diff
path: root/app/policies
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2020-12-19 00:55:12 +0100
committerClaire <claire.github-309c@sitedethib.com>2020-12-19 00:55:12 +0100
commitf9d000ebaec7732d5fcd46aa6685108a2619966b (patch)
tree9593841cf520b117ca4c3d5b68b19e9124c852da /app/policies
parent92cfcf168cae094ece281b3cb6d0f5b1539a8c25 (diff)
parentc6598b17d9212c2d48395da73fa9529025d704cc (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `app/services/resolve_url_service.rb`:
  The private toot search by URL hack has been revamped upstream.
  Took upstream's version.
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/account_policy.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/policies/account_policy.rb b/app/policies/account_policy.rb
index 262ada42e..672e1786b 100644
--- a/app/policies/account_policy.rb
+++ b/app/policies/account_policy.rb
@@ -14,7 +14,7 @@ class AccountPolicy < ApplicationPolicy
   end
 
   def suspend?
-    staff? && !record.user&.staff?
+    staff? && !record.user&.staff? && !record.instance_actor?
   end
 
   def destroy?
@@ -62,6 +62,6 @@ class AccountPolicy < ApplicationPolicy
   end
 
   def memorialize?
-    admin? && !record.user&.admin?
+    admin? && !record.user&.admin? && !record.instance_actor?
   end
 end