mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-31 20:19:05 +08:00
Add blacklist for dashboard activities
This commit is contained in:
parent
218096473a
commit
9bcf1a5df5
2 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue