about summary refs log tree commit diff
path: root/app/policies
diff options
context:
space:
mode:
authorEmelia Smith <ThisIsMissEm@users.noreply.github.com>2018-04-02 13:45:07 +0200
committerEugen Rochko <eugen@zeonfederated.com>2018-04-02 13:45:07 +0200
commite7a17167015dca6864f31152c47334c3b3a857a2 (patch)
treed730dec63e23d3a4ba9bf98c0137bed2f994cb02 /app/policies
parent4fd71accd419fb79cc75e0ebf30df374d174ebf5 (diff)
Implement the ability for an Administrator or Moderator to remove an account avatar (#6998)
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/account_policy.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/policies/account_policy.rb b/app/policies/account_policy.rb
index 85e2c8419..efabe80d0 100644
--- a/app/policies/account_policy.rb
+++ b/app/policies/account_policy.rb
@@ -29,6 +29,10 @@ class AccountPolicy < ApplicationPolicy
     admin?
   end
 
+  def remove_avatar?
+    staff?
+  end
+
   def subscribe?
     admin?
   end