BigW Consortium Gitlab

Commit 21bece44 by Timothy Andrew

Add models for the protected branch access levels.

- And hook up their associations.
parent f1e46d1e
...@@ -5,6 +5,9 @@ class ProtectedBranch < ActiveRecord::Base ...@@ -5,6 +5,9 @@ class ProtectedBranch < ActiveRecord::Base
validates :name, presence: true validates :name, presence: true
validates :project, presence: true validates :project, presence: true
has_one :merge_access_level
has_one :push_access_level
def commit def commit
project.commit(self.name) project.commit(self.name)
end end
......
class ProtectedBranch::MergeAccessLevel < ActiveRecord::Base
belongs_to :protected_branch
end
class ProtectedBranch::PushAccessLevel < ActiveRecord::Base
belongs_to :protected_branch
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment