about summary refs log tree commit diff
path: root/app/policies/invite_policy.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-08-19 09:46:26 +0200
committerGitHub <noreply@github.com>2018-08-19 09:46:26 +0200
commit484b9314e351fcab9e25b04c0024598433d2d688 (patch)
tree301ba59a7d214d5cf655263c95d731b9f18b6566 /app/policies/invite_policy.rb
parent44e31c3e531e5c206003b7ed83ee1d6fdd3b2b53 (diff)
parent88a0395a58739ff0a4bc8ff79bc0b60ac2c0f736 (diff)
Merge pull request #652 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/policies/invite_policy.rb')
-rw-r--r--app/policies/invite_policy.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/policies/invite_policy.rb b/app/policies/invite_policy.rb
index a2a65f934..14236f78b 100644
--- a/app/policies/invite_policy.rb
+++ b/app/policies/invite_policy.rb
@@ -9,6 +9,10 @@ class InvitePolicy < ApplicationPolicy
     min_required_role?
   end
 
+  def deactivate_all?
+    admin?
+  end
+
   def destroy?
     owner? || (Setting.min_invite_role == 'admin' ? admin? : staff?)
   end