Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Clark <james@jameshclrk.com>2017-04-08 01:21:16 +0300
committerJames Clark <james@jameshclrk.com>2017-05-07 18:26:52 +0300
commitc0632f1463f9d9b9afd67df3d216511463a1cc8e (patch)
tree2269b0d9f61b6c9fd71240ed01ea595be7f615b2 /app/helpers/preferences_helper.rb
parent6ad3814e1b31bfacfae7a2aabb4e4607b12ca66f (diff)
Hide clone panel and file list when user is only a guest
Fixes gitlab-org/gitlab-ce#17489 Fix test finding two of the same element Capybara will raise an exception because it finds two elements that match .nav-links. This means this test would fail, even if the page meets the conditions for passing the test. Add more tests for guest access
Diffstat (limited to 'app/helpers/preferences_helper.rb')
-rw-r--r--app/helpers/preferences_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/preferences_helper.rb b/app/helpers/preferences_helper.rb
index de959f13713..d36bb4ab074 100644
--- a/app/helpers/preferences_helper.rb
+++ b/app/helpers/preferences_helper.rb
@@ -49,7 +49,7 @@ module PreferencesHelper
user_view = current_user.project_view
- if @project.feature_available?(:repository, current_user)
+ if can?(current_user, :download_code, @project)
user_view
elsif user_view == "activity"
"activity"