diff options
Diffstat (limited to 'app/policies/account_policy.rb')
-rw-r--r-- | app/policies/account_policy.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/policies/account_policy.rb b/app/policies/account_policy.rb index 9c145979d..1b105e92a 100644 --- a/app/policies/account_policy.rb +++ b/app/policies/account_policy.rb @@ -17,6 +17,10 @@ class AccountPolicy < ApplicationPolicy staff? && !record.user&.staff? end + def destroy? + record.suspended? && record.deletion_request.present? && admin? + end + def unsuspend? staff? end |