summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-05-18 17:36:55 +0000
committerRémy Coutable <remy@rymai.me>2016-05-18 17:36:55 +0000
commite577bf2d6d808267df35d8c3a79442df137a3688 (patch)
treef6f3325d8adf3951ae3743a971b15b9df66af734
parent1227a1b239ae0f4c858eb47ac7cc816cd5788246 (diff)
parent66c421c0a788ab88f871103a26dceefc67585eec (diff)
downloadgitlab-ce-e577bf2d6d808267df35d8c3a79442df137a3688.tar.gz
Merge branch '15640-confidential-issue' into 'master'
Fix atom feeds and links 1. The atom feed for a group's issues didn't work, because it had parts copied from the dashboard issues builder template. 2. The feed link from a group's activity page went to the dashboard feed, rather than the group's feed. Closes #15640 See merge request !4191
-rw-r--r--CHANGELOG1
-rw-r--r--app/views/groups/_activities.html.haml2
-rw-r--r--app/views/groups/issues.atom.builder8
3 files changed, 6 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 9baab4734c6..70846be1c18 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -39,6 +39,7 @@ v 8.8.0 (unreleased)
- Create tags using Rugged for performance reasons. !3745
- API: Expose Issue#user_notes_count. !3126 (Anton Popov)
- Don't show forks button when user can't view forks
+ - Fix atom feed links and rendering
- Files over 5MB can only be viewed in their raw form, files over 1MB without highlighting !3718
- Add support for supressing text diffs using .gitattributes on the default branch (Matt Oakes)
- Add eager load paths to help prevent dependency load issues in Sidekiq workers. !3724
diff --git a/app/views/groups/_activities.html.haml b/app/views/groups/_activities.html.haml
index dc76599b776..71cc4d87b1f 100644
--- a/app/views/groups/_activities.html.haml
+++ b/app/views/groups/_activities.html.haml
@@ -4,7 +4,7 @@
.nav-block
- if current_user
.controls
- = link_to dashboard_projects_path(:atom, { private_token: current_user.private_token }), class: 'btn rss-btn' do
+ = link_to group_path(@group, format: :atom, private_token: current_user.private_token), class: 'btn rss-btn' do
%i.fa.fa-rss
= render 'shared/event_filter'
diff --git a/app/views/groups/issues.atom.builder b/app/views/groups/issues.atom.builder
index 486d1d8587a..a6eb9abada6 100644
--- a/app/views/groups/issues.atom.builder
+++ b/app/views/groups/issues.atom.builder
@@ -1,9 +1,9 @@
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
- xml.title "#{@user.name} issues"
- xml.link href: issues_dashboard_url(format: :atom, private_token: @user.private_token), rel: "self", type: "application/atom+xml"
- xml.link href: issues_dashboard_url, rel: "alternate", type: "text/html"
- xml.id issues_dashboard_url
+ xml.title "#{@group.name} issues"
+ xml.link href: issues_group_url(format: :atom, private_token: current_user.try(:private_token)), rel: "self", type: "application/atom+xml"
+ xml.link href: issues_group_url, rel: "alternate", type: "text/html"
+ xml.id issues_group_url
xml.updated @issues.first.created_at.xmlschema if @issues.any?
@issues.each do |issue|