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:
authorRémy Coutable <remy@rymai.me>2017-01-13 01:37:14 +0300
committerRémy Coutable <remy@rymai.me>2017-01-13 01:37:14 +0300
commit0b5b3ec3a432842bc53c7226c6db98e484aeee50 (patch)
tree5e72f4916f8a681c29bd4b40351b39ec62a1394b /lib/gitlab/checks
parentbf073583fba475382a927b8f35df6514d4bcb88f (diff)
Remove useless permission checks in Gitlab::Checks::ChangeAccess
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/gitlab/checks')
-rw-r--r--lib/gitlab/checks/change_access.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/checks/change_access.rb b/lib/gitlab/checks/change_access.rb
index 9c391fa92a3..273118135a9 100644
--- a/lib/gitlab/checks/change_access.rb
+++ b/lib/gitlab/checks/change_access.rb
@@ -30,9 +30,9 @@ module Gitlab
return unless @branch_name
return unless project.protected_branch?(@branch_name)
- if forced_push? && user_access.cannot_do_action?(:force_push_code_to_protected_branches)
+ if forced_push?
return "You are not allowed to force push code to a protected branch on this project."
- elsif Gitlab::Git.blank_ref?(@newrev) && user_access.cannot_do_action?(:remove_protected_branches)
+ elsif Gitlab::Git.blank_ref?(@newrev)
return "You are not allowed to delete protected branches from this project."
end