mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 11:45:18 +08:00
Add user check to project filter in quick start widget
This commit is contained in:
parent
26b687f2e6
commit
b898f03767
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ module Dashboard
|
|||
|
||||
def project_filter
|
||||
projects = current_team.projects.search(current_user, false, params[:query], 1, current_team)
|
||||
.where('user_projects.role <= 1')
|
||||
.where(user_projects: { user_id: current_user.id, role: %i(owner normal_user) })
|
||||
.select(:id, :name)
|
||||
projects = projects.map { |i| { value: i.id, label: escape_input(i.name) } }
|
||||
if (projects.map { |i| i[:label] }.exclude? params[:query]) && params[:query].present?
|
||||
|
|
Loading…
Reference in a new issue