Skip to content

Commit

Permalink
prevent non conferences to use hashtag hack
Browse files Browse the repository at this point in the history
  • Loading branch information
microstudi committed Sep 21, 2023
1 parent d874b48 commit cfa330f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/cells/concerns/decidim/conference_cell_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ module ConferenceCellExtensions
extend ActiveSupport::Concern

def conference_class(model)
return "" unless model.is_a?(Decidim::Conference)

custom_conference_types = Rails.application.secrets.custom_conference_types || []
custom_conference_types.each do |item|
return item[:key] if model.hashtag.include?(item[:hashtag])
Expand Down

0 comments on commit cfa330f

Please sign in to comment.