Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
034e8593
Commit
034e8593
authored
Nov 08, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dz-fix-project-index' into 'master'
Fix project index page See merge request !7331
parents
67ca15bb
8357ae98
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
3 deletions
+24
-3
CHANGELOG.md
CHANGELOG.md
+1
-0
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+3
-3
spec/controllers/projects_controller_spec.rb
spec/controllers/projects_controller_spec.rb
+20
-0
No files found.
CHANGELOG.md
View file @
034e8593
...
...
@@ -71,6 +71,7 @@ entry.
-
Fix applying GitHub-imported labels when importing job is interrupted
-
Allow to search for user by secondary email address in the admin interface(/admin/users) !7115 (YarNayar)
-
Updated commit SHA styling on the branches page.
-
Fix 404 when visit /projects page
## 8.13.3 (2016-11-02)
...
...
app/controllers/projects_controller.rb
View file @
034e8593
...
...
@@ -2,9 +2,9 @@ class ProjectsController < Projects::ApplicationController
include
IssuableCollections
include
ExtractsPath
before_action
:authenticate_user!
,
except:
[
:show
,
:activity
,
:refs
]
before_action
:project
,
except:
[
:new
,
:create
]
before_action
:repository
,
except:
[
:new
,
:create
]
before_action
:authenticate_user!
,
except:
[
:
index
,
:
show
,
:activity
,
:refs
]
before_action
:project
,
except:
[
:
index
,
:
new
,
:create
]
before_action
:repository
,
except:
[
:
index
,
:
new
,
:create
]
before_action
:assign_ref_vars
,
only:
[
:show
],
if: :repo_exists?
before_action
:tree
,
only:
[
:show
],
if:
[
:repo_exists?
,
:project_view_files?
]
...
...
spec/controllers/projects_controller_spec.rb
View file @
034e8593
...
...
@@ -7,6 +7,26 @@ describe ProjectsController do
let
(
:jpg
)
{
fixture_file_upload
(
Rails
.
root
+
'spec/fixtures/rails_sample.jpg'
,
'image/jpg'
)
}
let
(
:txt
)
{
fixture_file_upload
(
Rails
.
root
+
'spec/fixtures/doc_sample.txt'
,
'text/plain'
)
}
describe
'GET index'
do
context
'as a user'
do
it
'redirects to root page'
do
sign_in
(
user
)
get
:index
expect
(
response
).
to
redirect_to
(
root_path
)
end
end
context
'as a guest'
do
it
'redirects to Explore page'
do
get
:index
expect
(
response
).
to
redirect_to
(
explore_root_path
)
end
end
end
describe
"GET show"
do
context
"user not project member"
do
before
{
sign_in
(
user
)
}
...
...
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