diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-02-20 17:56:36 +0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2018-02-20 19:03:06 +0300 |
commit | e0e3f1c2750b6db9343d530d00b096bcb1a57677 (patch) | |
tree | 1ee744d81f999a06250c11c41c363cf29b5ce52e /app/helpers/preferences_helper.rb | |
parent | ccc858a5dfdb446d9648db2449d3ee3ef7a2be59 (diff) |
Move button list logic to project presenter
Diffstat (limited to 'app/helpers/preferences_helper.rb')
-rw-r--r-- | app/helpers/preferences_helper.rb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/app/helpers/preferences_helper.rb b/app/helpers/preferences_helper.rb index aaee6eaeedd..373dfd457f7 100644 --- a/app/helpers/preferences_helper.rb +++ b/app/helpers/preferences_helper.rb @@ -48,30 +48,4 @@ module PreferencesHelper def user_color_scheme Gitlab::ColorSchemes.for_user(current_user).css_class end - - def default_project_view - return anonymous_project_view unless current_user - - user_view = current_user.project_view - - if can?(current_user, :download_code, @project) - user_view - elsif user_view == "activity" - "activity" - elsif can?(current_user, :read_wiki, @project) - "wiki" - elsif @project.feature_available?(:issues, current_user) - "projects/issues/issues" - else - "customize_workflow" - end - end - - def anonymous_project_view - if !@project.empty_repo? && can?(current_user, :download_code, @project) - 'files' - else - 'activity' - end - end end |