diff options
author | Connor Shea <connor.james.shea@gmail.com> | 2016-08-16 16:59:19 -0600 |
---|---|---|
committer | Connor Shea <connor.james.shea@gmail.com> | 2016-08-16 16:59:19 -0600 |
commit | 1d3aa59f99a72f613b84286eef948dfbad20925e (patch) | |
tree | 0061000ff2226f3bc4e88ce8133a65403de9f37e /app/models/protected_branch | |
parent | 1e7cbe0b05ddd9c72987730323e63d612d429ab9 (diff) | |
parent | 76aa85cc8023e1a8176f0b783a52154f98a5be8f (diff) | |
download | gitlab-ce-1d3aa59f99a72f613b84286eef948dfbad20925e.tar.gz |
Merge branch 'master' into diff-line-comment-vuejs
Diffstat (limited to 'app/models/protected_branch')
-rw-r--r-- | app/models/protected_branch/merge_access_level.rb | 6 | ||||
-rw-r--r-- | app/models/protected_branch/push_access_level.rb | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/app/models/protected_branch/merge_access_level.rb b/app/models/protected_branch/merge_access_level.rb index b1112ee737d..806b3ccd275 100644 --- a/app/models/protected_branch/merge_access_level.rb +++ b/app/models/protected_branch/merge_access_level.rb @@ -1,4 +1,6 @@ class ProtectedBranch::MergeAccessLevel < ActiveRecord::Base + include ProtectedBranchAccess + belongs_to :protected_branch delegate :project, to: :protected_branch @@ -17,8 +19,4 @@ class ProtectedBranch::MergeAccessLevel < ActiveRecord::Base project.team.max_member_access(user.id) >= access_level end - - def humanize - self.class.human_access_levels[self.access_level] - end end diff --git a/app/models/protected_branch/push_access_level.rb b/app/models/protected_branch/push_access_level.rb index 6a5e49cf453..92e9c51d883 100644 --- a/app/models/protected_branch/push_access_level.rb +++ b/app/models/protected_branch/push_access_level.rb @@ -1,4 +1,6 @@ class ProtectedBranch::PushAccessLevel < ActiveRecord::Base + include ProtectedBranchAccess + belongs_to :protected_branch delegate :project, to: :protected_branch @@ -20,8 +22,4 @@ class ProtectedBranch::PushAccessLevel < ActiveRecord::Base project.team.max_member_access(user.id) >= access_level end - - def humanize - self.class.human_access_levels[self.access_level] - end end |