mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 06:35:56 +08:00
Revert "Revert "Search by team does not work [SCI-7763]""
This commit is contained in:
parent
0f8918e9f6
commit
9ba8cc328b
|
@ -154,8 +154,7 @@ module Users
|
|||
.where(user_assignments: { user: current_user })
|
||||
.where('? = ANY(user_roles.permissions)', TeamPermissions::USERS_MANAGE)
|
||||
.distinct
|
||||
|
||||
teams = teams.where_attributes_like(:name, params[:query]) if params[:query].present?
|
||||
teams = teams.where_attributes_like('teams.name', params[:query]) if params[:query].present?
|
||||
|
||||
teams.select { |team| can_invite_team_users?(team) }
|
||||
|
||||
|
|
Loading…
Reference in a new issue