diff options
author | ThibG <thib@sitedethib.com> | 2019-07-26 18:55:33 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-07-26 18:55:33 +0200 |
commit | 92569ffde81a3fe768fd8773fdab5d1a927f3f88 (patch) | |
tree | d5544ac69ccea9235baf679c1988ff8e811662ef /app/controllers | |
parent | a6b44401156524ef70a5917d17c93886c5e20a0d (diff) |
Fix invites not being disabled upon account suspension (#11412)
* Disable invite links from disabled/suspended users * Add has_many invites relationship to users * Destroy unused invites when suspending an account
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/invites_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/invites_controller.rb b/app/controllers/invites_controller.rb index fdb3a0962..de5280305 100644 --- a/app/controllers/invites_controller.rb +++ b/app/controllers/invites_controller.rb @@ -39,7 +39,7 @@ class InvitesController < ApplicationController private def invites - Invite.where(user: current_user).order(id: :desc) + current_user.invites.order(id: :desc) end def resource_params |