Commit 4bd331a5 authored by charlieablett's avatar charlieablett

Tighten up prohibited_key method

parent 8eae788f
......@@ -29,10 +29,9 @@ module Gitlab
return true if 'cached_markdown_version'.equal?(key)
prohibited_suffixes = %w(_id _html)
prohibited_suffixes.each do |suffix|
return true if key.end_with?(suffix)
prohibited_suffixes.any? do |suffix|
true if key.end_with?(suffix)
end
false
end
def allowed_reference?(key)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment