mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FEATURE: allow staff to send multiple invites to same email
This commit is contained in:
@ -35,6 +35,11 @@ class InvitesController < ApplicationController
|
||||
|
||||
guardian.ensure_can_invite_to_forum!(group_ids)
|
||||
|
||||
invite_exists = Invite.where(email: params[:email], invited_by_id: current_user.id).first
|
||||
if invite_exists
|
||||
guardian.ensure_can_send_multiple_invites!(current_user)
|
||||
end
|
||||
|
||||
if Invite.invite_by_email(params[:email], current_user, topic=nil, group_ids)
|
||||
render json: success_json
|
||||
else
|
||||
|
Reference in New Issue
Block a user