diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb index b7011d7afdf..a411cb417e2 100644 --- a/app/models/protected_branch.rb +++ b/app/models/protected_branch.rb @@ -5,6 +5,9 @@ class ProtectedBranch < ActiveRecord::Base validates :name, presence: true validates :project, presence: true + has_one :merge_access_level + has_one :push_access_level + def commit project.commit(self.name) end diff --git a/app/models/protected_branch/merge_access_level.rb b/app/models/protected_branch/merge_access_level.rb new file mode 100644 index 00000000000..78cec5bf566 --- /dev/null +++ b/app/models/protected_branch/merge_access_level.rb @@ -0,0 +1,3 @@ +class ProtectedBranch::MergeAccessLevel < ActiveRecord::Base + belongs_to :protected_branch +end diff --git a/app/models/protected_branch/push_access_level.rb b/app/models/protected_branch/push_access_level.rb new file mode 100644 index 00000000000..d53c4c391e3 --- /dev/null +++ b/app/models/protected_branch/push_access_level.rb @@ -0,0 +1,3 @@ +class ProtectedBranch::PushAccessLevel < ActiveRecord::Base + belongs_to :protected_branch +end