BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
00726e4d
Commit
00726e4d
authored
Mar 29, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/nomethod-error-on-ci' into 'master'
Fix error when visiting CI root path Closes #14528, closes #14687 See merge request !3377
parents
af8df7e5
b7685b57
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
21 deletions
+31
-21
CHANGELOG
CHANGELOG
+1
-0
projects_controller.rb
app/controllers/ci/projects_controller.rb
+9
-1
index.html.haml
app/views/ci/projects/index.html.haml
+0
-20
projects_controller_spec.rb
spec/controllers/ci/projects_controller_spec.rb
+21
-0
No files found.
CHANGELOG
View file @
00726e4d
...
@@ -12,6 +12,7 @@ v 8.7.0 (unreleased)
...
@@ -12,6 +12,7 @@ v 8.7.0 (unreleased)
v 8.6.2 (unreleased)
v 8.6.2 (unreleased)
- Comments on confidential issues don't show up in activity feed to non-members
- Comments on confidential issues don't show up in activity feed to non-members
- Fix NoMethodError when visiting CI root path at `/ci`
v 8.6.1
v 8.6.1
- Add option to reload the schema before restoring a database backup. !2807
- Add option to reload the schema before restoring a database backup. !2807
...
...
app/controllers/ci/projects_controller.rb
View file @
00726e4d
module
Ci
module
Ci
class
ProjectsController
<
Ci
::
ApplicationController
class
ProjectsController
<
Ci
::
ApplicationController
before_action
:project
before_action
:project
before_action
:authorize_read_project!
,
except:
[
:badge
]
before_action
:no_cache
,
only:
[
:badge
]
before_action
:no_cache
,
only:
[
:badge
]
before_action
:authorize_read_project!
,
except:
[
:badge
,
:index
]
skip_before_action
:authenticate_user!
,
only:
[
:badge
]
skip_before_action
:authenticate_user!
,
only:
[
:badge
]
protect_from_forgery
protect_from_forgery
def
index
redirect_to
root_path
end
def
show
def
show
# Temporary compatibility with CI badges pointing to CI project page
# Temporary compatibility with CI badges pointing to CI project page
redirect_to
namespace_project_path
(
project
.
namespace
,
project
)
redirect_to
namespace_project_path
(
project
.
namespace
,
project
)
...
@@ -35,5 +39,9 @@ module Ci
...
@@ -35,5 +39,9 @@ module Ci
response
.
headers
[
"Pragma"
]
=
"no-cache"
response
.
headers
[
"Pragma"
]
=
"no-cache"
response
.
headers
[
"Expires"
]
=
"Fri, 01 Jan 1990 00:00:00 GMT"
response
.
headers
[
"Expires"
]
=
"Fri, 01 Jan 1990 00:00:00 GMT"
end
end
def
authorize_read_project!
return
access_denied!
unless
can?
(
current_user
,
:read_project
,
project
)
end
end
end
end
end
app/views/ci/projects/index.html.haml
deleted
100644 → 0
View file @
af8df7e5
.wiki
%h1
GitLab CI is now integrated in GitLab UI
%h2
For existing projects
%p
Check the following pages to find the CI status you're looking for:
%ul
%li
Projects page - shows CI status for each project.
%li
Project commits page - show CI status for each commit.
%h2
For new projects
%p
If you want to enable CI for a new project it is easy as adding
=
link_to
".gitlab-ci.yml"
,
"http://doc.gitlab.com/ce/ci/yaml/README.html"
file to your repository
spec/controllers/ci/projects_controller_spec.rb
View file @
00726e4d
...
@@ -5,6 +5,27 @@ describe Ci::ProjectsController do
...
@@ -5,6 +5,27 @@ describe Ci::ProjectsController do
let!
(
:project
)
{
create
(
:project
,
visibility
,
ci_id:
1
)
}
let!
(
:project
)
{
create
(
:project
,
visibility
,
ci_id:
1
)
}
let
(
:ci_id
)
{
project
.
ci_id
}
let
(
:ci_id
)
{
project
.
ci_id
}
describe
'#index'
do
context
'user signed in'
do
before
do
sign_in
(
create
(
:user
))
get
(
:index
)
end
it
'redirects to /'
do
expect
(
response
).
to
redirect_to
(
root_path
)
end
end
context
'user not signed in'
do
before
{
get
(
:index
)
}
it
'redirects to sign in page'
do
expect
(
response
).
to
redirect_to
(
new_user_session_path
)
end
end
end
##
##
# Specs for *deprecated* CI badge
# Specs for *deprecated* CI badge
#
#
...
...
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