Add models for the protected branch access levels.
- And hook up their associations.
This commit is contained in:
parent
f1e46d1e63
commit
21bece443d
3 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
3
app/models/protected_branch/merge_access_level.rb
Normal file
3
app/models/protected_branch/merge_access_level.rb
Normal file
|
@ -0,0 +1,3 @@
|
|||
class ProtectedBranch::MergeAccessLevel < ActiveRecord::Base
|
||||
belongs_to :protected_branch
|
||||
end
|
3
app/models/protected_branch/push_access_level.rb
Normal file
3
app/models/protected_branch/push_access_level.rb
Normal file
|
@ -0,0 +1,3 @@
|
|||
class ProtectedBranch::PushAccessLevel < ActiveRecord::Base
|
||||
belongs_to :protected_branch
|
||||
end
|
Loading…
Reference in a new issue