diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-07-05 13:10:42 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-07-29 15:20:39 +0530 |
commit | 21bece443d5f871680a3d7649c2d16861035196d (patch) | |
tree | 837e4669d5ca702cc5dd520e6c7ffbde54311d6d /app/models/protected_branch.rb | |
parent | f1e46d1e63faf63f1dc9960c5f28d5260dfc84db (diff) | |
download | gitlab-ce-21bece443d5f871680a3d7649c2d16861035196d.tar.gz |
Add models for the protected branch access levels.
- And hook up their associations.
Diffstat (limited to 'app/models/protected_branch.rb')
-rw-r--r-- | app/models/protected_branch.rb | 3 |
1 files changed, 3 insertions, 0 deletions
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 |