summaryrefslogtreecommitdiff
path: root/app/helpers/compare_helper.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-04-06 14:18:58 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-04-11 10:51:15 +0200
commit8ad9c4e873f2185e8bbfa6f363db32dbbba27141 (patch)
treecefefd09ed7f5b03307f31d240f7a20d757ac185 /app/helpers/compare_helper.rb
parentec43e3644436e0ae90f6fb6a64256c38ceb68cc9 (diff)
downloadgitlab-ce-8ad9c4e873f2185e8bbfa6f363db32dbbba27141.tar.gz
Rename `create_merge_request` permissions
So we can distinguish between the permissions on the source and the target project. - `create_merge_request_from` indicates a user can create a merge request with the project as a source_project - `create_merge_request_in` indicates a user can create a merge request with the project as a target_project
Diffstat (limited to 'app/helpers/compare_helper.rb')
-rw-r--r--app/helpers/compare_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/compare_helper.rb b/app/helpers/compare_helper.rb
index 8bf96c0905f..2df5b5d1695 100644
--- a/app/helpers/compare_helper.rb
+++ b/app/helpers/compare_helper.rb
@@ -3,7 +3,7 @@ module CompareHelper
from.present? &&
to.present? &&
from != to &&
- can?(current_user, :create_merge_request, project) &&
+ can?(current_user, :create_merge_request_from, project) &&
project.repository.branch_exists?(from) &&
project.repository.branch_exists?(to)
end