Commit ded80cc2 authored by Gary Holtz's avatar Gary Holtz Committed by Andrew Fontaine

Moving method/correcting error

parent 83511120
......@@ -635,7 +635,9 @@ module ProjectsHelper
end
def can_show_last_commit_in_list?(project)
can?(current_user, :read_cross_project) && project.commit
can?(current_user, :read_cross_project) &&
can?(current_user, :read_commit_status, project) &&
project.commit
end
def pages_https_only_disabled?
......
......@@ -5,7 +5,7 @@
- pipeline_status = true unless local_assigns[:pipeline_status] == false
- skip_namespace = false unless local_assigns[:skip_namespace] == true
- user = local_assigns[:user]
- show_last_commit_as_description = false unless local_assigns[:show_last_commit_as_description] == true && can_show_last_commit_in_list?(project)
- show_last_commit_as_description = false unless local_assigns[:show_last_commit_as_description] == true
- remote = false unless local_assigns[:remote] == true
- skip_pagination = false unless local_assigns[:skip_pagination] == true
- compact_mode = false unless local_assigns[:compact_mode] == true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment