diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-11-01 20:18:51 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-11-09 12:25:17 +0100 |
commit | bf061d0aff091a73611037b811cea2d3380962f4 (patch) | |
tree | 11294b9f8d9b321f597c268bd4846ffd5b99f6e9 /spec/lib/banzai/reference_parser/external_issue_parser_spec.rb | |
parent | 79d94b167999544086db235602a9213a2d37831e (diff) | |
download | gitlab-ce-bf061d0aff091a73611037b811cea2d3380962f4.tar.gz |
Merge branch 'issue_23548_dev' into 'master'
disable markdown in comments when referencing disabled features
fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23548
This MR prevents the following references when tool is disabled:
- issues
- snippets
- commits - when repo is disabled
- commit range - when repo is disabled
- milestones
This MR does not prevent references to repository files, since they are just markdown links and don't leak
information.
See merge request !2011
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/lib/banzai/reference_parser/external_issue_parser_spec.rb')
-rw-r--r-- | spec/lib/banzai/reference_parser/external_issue_parser_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/banzai/reference_parser/external_issue_parser_spec.rb b/spec/lib/banzai/reference_parser/external_issue_parser_spec.rb index a6ef8394fe7..50a5d1a19ba 100644 --- a/spec/lib/banzai/reference_parser/external_issue_parser_spec.rb +++ b/spec/lib/banzai/reference_parser/external_issue_parser_spec.rb @@ -8,6 +8,14 @@ describe Banzai::ReferenceParser::ExternalIssueParser, lib: true do subject { described_class.new(project, user) } let(:link) { empty_html_link } + describe '#nodes_visible_to_user' do + context 'when the link has a data-issue attribute' do + before { link['data-external-issue'] = 123 } + + it_behaves_like "referenced feature visibility", "issues" + end + end + describe '#referenced_by' do context 'when the link has a data-project attribute' do before do |