mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-10 14:16:28 +08:00
Add user check to invite user modal
This commit is contained in:
parent
a819e1b8f4
commit
e46e496702
1 changed files with 1 additions and 1 deletions
|
|
@ -76,7 +76,7 @@ invite_to_team = type.in?(%w(invite_to_team invite_to_team_with_role))
|
||||||
<br />
|
<br />
|
||||||
<em><%= t('invite_users.input_subtitle') %></em>
|
<em><%= t('invite_users.input_subtitle') %></em>
|
||||||
|
|
||||||
<% if type.in?(['invite_with_team_selector', 'invite_with_team_selector_and_role']) %>
|
<% if current_user && type.in?(['invite_with_team_selector', 'invite_with_team_selector_and_role']) %>
|
||||||
<% # Only allow inviting to teams where user is admin %>
|
<% # Only allow inviting to teams where user is admin %>
|
||||||
<% teams = current_user.teams
|
<% teams = current_user.teams
|
||||||
.joins(:user_teams)
|
.joins(:user_teams)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue