Skip to content
Snippets Groups Projects
Commit 18531744 authored by Rodrigo Souto's avatar Rodrigo Souto Committed by Rémy Coutable
Browse files

Make grouped milestone page public

Grouped milestone page now will skip authentication.

Solves #13403 which was a created in response to
https://gitlab.com/gitlab-com/www-gitlab-com/issues/554
parent a34021cd
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -33,6 +33,7 @@ v 8.6.0 (unreleased)
- Fix bug where Bitbucket `closed` issues were imported as `opened` (Iuri de Silvio)
- Don't show Issues/MRs from archived projects in Groups view
- Fix wrong "iid of max iid" in Issuable sidebar for some merged MRs
- Make grouped milestone page public (Rodrigo Souto)
- Increase the notes polling timeout over time (Roberto Dip)
- Add shortcut to toggle markdown preview (Florent Baldino)
- Show labels in dashboard and group milestone views
Loading
Loading
class Groups::MilestonesController < Groups::ApplicationController
include GlobalMilestones
 
skip_before_action :authenticate_user!, only: [:show]
before_action :projects
before_action :milestones, only: [:index]
before_action :milestone, only: [:show, :update]
Loading
Loading
Loading
Loading
@@ -8,20 +8,40 @@ describe Groups::MilestonesController do
let(:title) { '肯定不是中文的问题' }
 
before do
sign_in(user)
group.add_owner(user)
project.team << [user, :master]
controller.instance_variable_set(:@group, group)
end
 
describe "#create" do
it "should create group milestone with Chinese title" do
post :create,
group_id: group.id,
milestone: { project_ids: [project.id, project2.id], title: title }
context 'unauthenticated user' do
describe "#show" do
it "should display milestone" do
create(:milestone, title: title, project: project)
 
expect(response).to redirect_to(group_milestone_path(group, title.to_slug.to_s, title: title))
expect(Milestone.where(title: title).count).to eq(2)
get :show,
group_id: group.id,
id: title,
title: title
expect(response).to be_success
end
end
end
context 'project owner' do
before do
sign_in(user)
group.add_owner(user)
project.team << [user, :master]
end
describe "#create" do
it "should create group milestone with Chinese title" do
post :create,
group_id: group.id,
milestone: { project_ids: [project.id, project2.id], title: title }
expect(response).to redirect_to(group_milestone_path(group, title.to_slug.to_s, title: title))
expect(Milestone.where(title: title).count).to eq(2)
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment