diff options
Diffstat (limited to 'app/models/event.rb')
-rw-r--r-- | app/models/event.rb | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/app/models/event.rb b/app/models/event.rb index 5b755736f47..14d20b0d6c4 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -24,15 +24,14 @@ class Event < ApplicationRecord left: 9, # User left project destroyed: 10, expired: 11, # User left project due to expiry - approved: 12, - archived: 13 # Recoverable deletion + approved: 12 ).freeze private_constant :ACTIONS WIKI_ACTIONS = [:created, :updated, :destroyed].freeze - DESIGN_ACTIONS = [:created, :updated, :destroyed, :archived].freeze + DESIGN_ACTIONS = [:created, :updated, :destroyed].freeze TARGET_TYPES = HashWithIndifferentAccess.new( issue: Issue, @@ -390,16 +389,15 @@ class Event < ApplicationRecord read_snippet: %i[personal_snippet_note? project_snippet_note?], read_milestone: %i[milestone?], read_wiki: %i[wiki_page?], - read_design: %i[design_note? design?] + read_design: %i[design_note? design?], + read_note: %i[note?] } end private def permission_object - if note? - note_target - elsif target_id.present? + if target_id.present? target else project @@ -438,8 +436,7 @@ class Event < ApplicationRecord { created: _('uploaded'), updated: _('revised'), - destroyed: _('deleted'), - archived: _('archived') + destroyed: _('deleted') } end |