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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
dcd70453
Commit
dcd70453
authored
Nov 01, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Guest sees some repository details and gets 404
parent
73ab9ba5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
app/views/projects/show.html.haml
app/views/projects/show.html.haml
+1
-1
changelogs/unreleased/24056-guest-sees-some-project-details-and-gets-404.yml
...ed/24056-guest-sees-some-project-details-and-gets-404.yml
+4
-0
spec/features/projects/features_visibility_spec.rb
spec/features/projects/features_visibility_spec.rb
+15
-0
No files found.
app/views/projects/show.html.haml
View file @
dcd70453
...
...
@@ -12,7 +12,7 @@
=
render
'projects/last_push'
=
render
"home_panel"
-
if
@project
.
feature_available?
(
:repository
,
current_user
)
-
if
current_user
&&
can?
(
current_user
,
:download_code
,
@project
)
%nav
.project-stats
{
class:
container_class
}
%ul
.nav
%li
...
...
changelogs/unreleased/24056-guest-sees-some-project-details-and-gets-404.yml
0 → 100644
View file @
dcd70453
---
title
:
'
Fix:
Guest
sees
some
repository
details
and
gets
404'
merge_request
:
author
:
spec/features/projects/features_visibility_spec.rb
View file @
dcd70453
...
...
@@ -183,4 +183,19 @@ describe 'Edit Project Settings', feature: true do
end
end
end
# Regression spec for https://gitlab.com/gitlab-org/gitlab-ce/issues/24056
describe
'project statistic visibility'
do
let!
(
:project
)
{
create
(
:project
,
:private
)
}
before
do
project
.
team
<<
[
member
,
:guest
]
login_as
(
member
)
visit
namespace_project_path
(
project
.
namespace
,
project
)
end
it
"does not show project statistic for guest"
do
expect
(
page
).
not_to
have_selector
(
'.project-stats'
)
end
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