diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-02-18 02:02:54 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-18 02:18:09 -0600 |
commit | 0f3b01eaab82325baaf1c7a4c75a322d3c21a67f (patch) | |
tree | f3d19c99328336997919803ffc6850a96d5a6411 /app/policies/invite_policy.rb | |
parent | fc69e4a0bb4e3d2fdcb2ffef0f3211f8c347ed15 (diff) |
switch to irc-like oper behavior; require mods & admins to explicitly oper up using `fangs`/`op` bangtag or toggling defang setting in profile; auto-defang after 15 mins or with `defang`/`deop` bangtag
Diffstat (limited to 'app/policies/invite_policy.rb')
-rw-r--r-- | app/policies/invite_policy.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/policies/invite_policy.rb b/app/policies/invite_policy.rb index 14236f78b..44fa56049 100644 --- a/app/policies/invite_policy.rb +++ b/app/policies/invite_policy.rb @@ -2,7 +2,7 @@ class InvitePolicy < ApplicationPolicy def index? - staff? + !defanged? && can_moderate? end def create? @@ -10,11 +10,11 @@ class InvitePolicy < ApplicationPolicy end def deactivate_all? - admin? + !defanged? && admin? end def destroy? - owner? || (Setting.min_invite_role == 'admin' ? admin? : staff?) + owner? || (!defanged? && (Setting.min_invite_role == 'admin' ? admin? : can_moderate?)) end private |