summaryrefslogtreecommitdiff
path: root/app/helpers/tree_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/tree_helper.rb')
-rw-r--r--app/helpers/tree_helper.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb
index d39cac0f510..f6a6d9bebde 100644
--- a/app/helpers/tree_helper.rb
+++ b/app/helpers/tree_helper.rb
@@ -55,7 +55,9 @@ module TreeHelper
def tree_edit_branch(project = @project, ref = @ref)
return unless can_edit_tree?(project, ref)
- if can_push_branch?(project, ref)
+ project = project.present(current_user: current_user)
+
+ if project.can_current_user_push_to_branch?(ref)
ref
else
project = tree_edit_project(project)
@@ -81,6 +83,10 @@ module TreeHelper
" A fork of this project has been created that you can make changes in, so you can submit a merge request."
end
+ def edit_in_new_fork_notice_action(action)
+ edit_in_new_fork_notice + " Try to #{action} this file again."
+ end
+
def commit_in_fork_help
"A new branch will be created in your fork and a new merge request will be started."
end