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:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2017-11-24 15:41:36 +0300
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-11-24 16:20:56 +0300
commitd6dd9d712ac24a095d0b0506731f9415b7c3b5f5 (patch)
treedd8cb75a449d3632902d94933ab36210f5d6abf8 /app/models/concerns/protected_branch_access.rb
parente548c613346a09ba2fc8dfd6ed64da6628ec6a45 (diff)
Fix ProtectedBranch access level validations
Before an access_level was required in EE even when an it had been set for a user/group.
Diffstat (limited to 'app/models/concerns/protected_branch_access.rb')
-rw-r--r--app/models/concerns/protected_branch_access.rb10
1 files changed, 0 insertions, 10 deletions
diff --git a/app/models/concerns/protected_branch_access.rb b/app/models/concerns/protected_branch_access.rb
index fde1cc44afa..77307e92f22 100644
--- a/app/models/concerns/protected_branch_access.rb
+++ b/app/models/concerns/protected_branch_access.rb
@@ -1,12 +1,6 @@
module ProtectedBranchAccess
extend ActiveSupport::Concern
- ALLOWED_ACCESS_LEVELS ||= [
- Gitlab::Access::MASTER,
- Gitlab::Access::DEVELOPER,
- Gitlab::Access::NO_ACCESS
- ].freeze
-
included do
include ProtectedRefAccess
@@ -14,10 +8,6 @@ module ProtectedBranchAccess
delegate :project, to: :protected_branch
- validates :access_level, presence: true, inclusion: {
- in: ALLOWED_ACCESS_LEVELS
- }
-
def self.human_access_levels
{
Gitlab::Access::MASTER => "Masters",