mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 02:04:33 +08:00
Fix free invite users modal [SCI-5900]
This commit is contained in:
parent
d78e4713c8
commit
ff0ac9f497
3 changed files with 3 additions and 2 deletions
|
@ -137,6 +137,7 @@
|
|||
data.role = modal.attr('data-team-role');
|
||||
break;
|
||||
case 'invite':
|
||||
data.team_ids = [];
|
||||
break;
|
||||
case 'invite_with_team_selector':
|
||||
if (teamSelectorCheckbox.is(':checked')) {
|
||||
|
|
|
@ -204,7 +204,7 @@ module Users
|
|||
@emails = params[:emails]&.map(&:downcase)
|
||||
|
||||
@teams = Team.where(id: params[:team_ids]).select { |team| can_manage_team_users?(team) }
|
||||
return render_403 if @teams.none?
|
||||
return render_403 if params[:team_ids].present? && @teams.none?
|
||||
|
||||
@role = params['role']
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ invite_with_team_selector = type.in?(%w(invite_new_members invite_with_team_sele
|
|||
<% end %>
|
||||
</p>
|
||||
|
||||
<% if type == 'invite_new_members' %>
|
||||
<% if type.in? ['invite_new_members', 'invite'] %>
|
||||
<p><%= t('invite_users.new_members.description') %></p>
|
||||
<h4 class="heading">
|
||||
<span><%= t('invite_users.new_members.input_label') %></span>
|
||||
|
|
Loading…
Reference in a new issue