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:
Diffstat (limited to 'lib/gitlab/access/branch_protection.rb')
-rw-r--r--lib/gitlab/access/branch_protection.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/access/branch_protection.rb b/lib/gitlab/access/branch_protection.rb
index 339a99eb068..6ac8de407b0 100644
--- a/lib/gitlab/access/branch_protection.rb
+++ b/lib/gitlab/access/branch_protection.rb
@@ -34,6 +34,10 @@ module Gitlab
level == PROTECTION_DEV_CAN_PUSH
end
+ def developer_can_initial_push?
+ level == PROTECTION_DEV_CAN_INITIAL_PUSH
+ end
+
def developer_can_merge?
level == PROTECTION_DEV_CAN_MERGE
end