Add blacklist for dashboard activities

This commit is contained in:
Urban Rotnik 2020-07-23 14:22:58 +02:00
parent 218096473a
commit 9bcf1a5df5
2 changed files with 3 additions and 0 deletions

View file

@ -18,6 +18,7 @@ module Dashboard
.where('((project_id IS NULL AND team_id = ?) OR project_id IN (?))', .where('((project_id IS NULL AND team_id = ?) OR project_id IN (?))',
@team.id, @team.id,
visible_projects.pluck(:id)) visible_projects.pluck(:id))
.where.not(type_of: Extends::DASHBOARD_BLACKLIST_ACTIVITY_TYPES)
.select('MAX(created_at) AS last_change', .select('MAX(created_at) AS last_change',
:subject_id, :subject_id,
:subject_type) :subject_type)

View file

@ -314,4 +314,6 @@ class Extends
shared_read: 'view-only', shared_read: 'view-only',
shared_write: 'edit' shared_write: 'edit'
}.freeze }.freeze
DASHBOARD_BLACKLIST_ACTIVITY_TYPES = %i(export_protocol_in_repository copy_protocol_in_repository).freeze
end end