Allow admin to deactivate invite created by users (#5860)

This commit is contained in:
Yamagishi Kazutoshi
2017-12-01 20:26:19 +09:00
committed by Eugen Rochko
parent 9927df83ad
commit df03042a6e
3 changed files with 7 additions and 3 deletions

View File

@ -10,7 +10,7 @@ class InvitePolicy < ApplicationPolicy
end
def destroy?
owner? || staff?
owner? || (Setting.min_invite_role == 'admin' ? admin? : staff?)
end
private