1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00

Fix a bug: unable to show projets whom user take part in

This commit is contained in:
Du Peng 2022-04-15 13:20:50 +02:00
parent e93a306f58
commit 2a71b3e78d
2 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
- Fix a bug: unable to send notification mail if no set a logo
- Fix a bug: unable to switch OpenLab projets
- Fix a bug: miss smtp tls in secrets.yml
- Fix a bug: unable to show projets whom user take part in
- Fix a security issue: updated puma to 4.3.12 to fix [CVE-2022-24790](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24790)
- Fix a security issue: updated moment to 2.29.2 to fix [CVE-2022-24785](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24785)
- Fix a security issue: updated nokogiri to 1.13.4 to fix [CVE-2022-24839](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24839), [CVE-2018-25032](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-25032), [CVE-2022-24836](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24836) and [CVE-2022-23437](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-23437)

View File

@ -55,7 +55,7 @@ class Project < ApplicationRecord
where("state = 'published' OR (state = 'draft' AND author_statistic_profile_id = ?)", author_profile)
}
scope :user_projects, ->(author_profile) { where('author_statistic_profile_id = ?', author_profile) }
scope :collaborations, ->(collaborators_ids) { joins(:projects_users).where(projects_users: { user_id: collaborators_ids }) }
scope :collaborations, ->(collaborators_ids) { joins(:project_users).where(project_users: { user_id: collaborators_ids }) }
scope :with_machine, ->(machines_ids) { joins(:projects_machines).where(projects_machines: { machine_id: machines_ids }) }
scope :with_theme, ->(themes_ids) { joins(:projects_themes).where(projects_themes: { theme_id: themes_ids }) }
scope :with_component, ->(component_ids) { joins(:projects_components).where(projects_components: { component_id: component_ids }) }