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:
authorMario de la Ossa <mdelaossa@gitlab.com>2018-02-02 21:39:55 +0300
committerSean McGivern <sean@mcgivern.me.uk>2018-02-02 21:39:55 +0300
commiteaada9d7066a20b5af815f723e09cde60a5c8c10 (patch)
tree72ba4231e28f1c5e5405db21e0611a55e6428145 /app/models/protected_branch.rb
parent8fa2932dc5cc7687e7d85ae7b00c07fd9bcc24a4 (diff)
use Gitlab::UserSettings directly as a singleton instead of including/extending it
Diffstat (limited to 'app/models/protected_branch.rb')
-rw-r--r--app/models/protected_branch.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb
index d28fed11ca8..609780c5587 100644
--- a/app/models/protected_branch.rb
+++ b/app/models/protected_branch.rb
@@ -2,8 +2,6 @@ class ProtectedBranch < ActiveRecord::Base
include Gitlab::ShellAdapter
include ProtectedRef
- extend Gitlab::CurrentSettings
-
protected_ref_access_levels :merge, :push
# Check if branch name is marked as protected in the system
@@ -16,7 +14,7 @@ class ProtectedBranch < ActiveRecord::Base
end
def self.default_branch_protected?
- current_application_settings.default_branch_protection == Gitlab::Access::PROTECTION_FULL ||
- current_application_settings.default_branch_protection == Gitlab::Access::PROTECTION_DEV_CAN_MERGE
+ Gitlab::CurrentSettings.default_branch_protection == Gitlab::Access::PROTECTION_FULL ||
+ Gitlab::CurrentSettings.default_branch_protection == Gitlab::Access::PROTECTION_DEV_CAN_MERGE
end
end