Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Privacy
Imprint
Contact
Login methods
Sign in
Toggle navigation
Menu
Open sidebar
projects.thm.de
GitLab
Commits
5907207e
Commit
5907207e
authored
Nov 28, 2013
by
Steven Thonus
Browse files
showing as default http link for public repo when anonymous
parent
2e07865f
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/views/shared/_clone_panel.html.haml
View file @
5907207e
.git-clone-holder
%button
{
class:
"btn
active
"
,
:"data-clone"
=>
@project
.
ssh_url_to_repo
}
SSH
%button
{
class:
"btn"
,
:"data-clone"
=>
@project
.
http_url_to_repo
}=
gitlab_config
.
protocol
.
upcase
=
text_field_tag
:project_clone
,
@project
.
url_to_repo
,
class:
"one_click_select span5"
,
readonly:
true
%button
{
class:
"btn
#{ current_user ? 'active' : '' }
"
,
:"data-clone"
=>
@project
.
ssh_url_to_repo
}
SSH
%button
{
class:
"btn
#{ current_user ? '' : 'active' }
"
,
:"data-clone"
=>
@project
.
http_url_to_repo
}=
gitlab_config
.
protocol
.
upcase
=
text_field_tag
:project_clone
,
(
current_user
?
@project
.
url_to_repo
:
@project
.
http_url_to_repo
)
,
class:
"one_click_select span5"
,
readonly:
true
features/public/public_projects.feature
View file @
5907207e
...
...
@@ -38,3 +38,14 @@ Feature: Public Projects Feature
Given
I sign in as a user
When
I visit project
"Internal"
page
Then
I should see project
"Internal"
home page
Scenario
:
I
visit public project page
When
I visit project
"Community"
page
Then
I should see project
"Community"
home page
And
I should see a http link to the repository
Scenario
:
I
visit public area as user
Given
I sign in as a user
When
I visit project
"Community"
page
Then
I should see project
"Community"
home page
And
I should see a ssh link to the repository
features/steps/public/projects_feature.rb
View file @
5907207e
...
...
@@ -83,5 +83,15 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
page
.
should
have_content
'Internal'
end
end
Then
'I should see a http link to the repository'
do
project
=
Project
.
find_by_name
'Community'
page
.
should
have_field
(
'project_clone'
,
with:
project
.
http_url_to_repo
)
end
Then
'I should see a ssh link to the repository'
do
project
=
Project
.
find_by_name
'Community'
page
.
should
have_field
(
'project_clone'
,
with:
project
.
url_to_repo
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment