diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-07-08 14:46:13 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-07-29 15:20:39 +0530 |
commit | c647540c1010fd1e51bced1db90947aa00c83fa8 (patch) | |
tree | 882a9a21dec98c567c7ac21b03058b09bc24bce3 /app/models/protected_branch | |
parent | a9958ddc7c9d4c455d4c5459b7b83da1fab9ccb4 (diff) | |
download | gitlab-ce-c647540c1010fd1e51bced1db90947aa00c83fa8.tar.gz |
Fix all specs related to changes in !5081.
1. Remove `Project#developers_can_push_to_protected_branch?` since it
isn't used anymore.
2. Remove `Project#developers_can_merge_to_protected_branch?` since it
isn't used anymore.
Diffstat (limited to 'app/models/protected_branch')
-rw-r--r-- | app/models/protected_branch/merge_access_level.rb | 2 | ||||
-rw-r--r-- | app/models/protected_branch/push_access_level.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/protected_branch/merge_access_level.rb b/app/models/protected_branch/merge_access_level.rb index 2d13d8c8381..3d2a6971702 100644 --- a/app/models/protected_branch/merge_access_level.rb +++ b/app/models/protected_branch/merge_access_level.rb @@ -8,7 +8,7 @@ class ProtectedBranch::MergeAccessLevel < ActiveRecord::Base if masters? user.can?(:push_code, project) if project.team.master?(user) elsif developers? - user.can?(:push_code, project) if (project.team.master?(user) || project.team.developer?(user)) + user.can?(:push_code, project) if project.team.master?(user) || project.team.developer?(user) end end end diff --git a/app/models/protected_branch/push_access_level.rb b/app/models/protected_branch/push_access_level.rb index 5a4a33556ce..d446c1a03f0 100644 --- a/app/models/protected_branch/push_access_level.rb +++ b/app/models/protected_branch/push_access_level.rb @@ -8,7 +8,7 @@ class ProtectedBranch::PushAccessLevel < ActiveRecord::Base if masters? user.can?(:push_code, project) if project.team.master?(user) elsif developers? - user.can?(:push_code, project) if (project.team.master?(user) || project.team.developer?(user)) + user.can?(:push_code, project) if project.team.master?(user) || project.team.developer?(user) elsif no_one? false end |