Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5dbeb6f1
Commit
5dbeb6f1
authored
Apr 05, 2018
by
Davin Walker
Committed by
Cindy Pallares
Oct 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update api_service.rb
parent
6500145d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
ee/app/services/ee/protected_branches/api_service.rb
ee/app/services/ee/protected_branches/api_service.rb
+2
-2
No files found.
ee/app/services/ee/protected_branches/api_service.rb
View file @
5dbeb6f1
...
...
@@ -30,7 +30,7 @@ module EE
group_ids
=
@merge_params
.
group_ids
+
@push_params
.
group_ids
+
@unprotect_params
.
group_ids
# rubocop:disable Gitlab/ModuleWithInstanceVariables
allowed_groups
=
@project
.
invited_groups
.
where
(
id:
group_ids
)
# rubocop:disable Gitlab/ModuleWithInstanceVariables
group_ids
.
count
==
allowed_groups
.
count
group_ids
.
uniq
.
count
==
allowed_groups
.
count
end
# rubocop: enable CodeReuse/ActiveRecord
...
...
@@ -39,7 +39,7 @@ module EE
user_ids
=
@merge_params
.
user_ids
+
@push_params
.
user_ids
+
@unprotect_params
.
user_ids
# rubocop:disable Gitlab/ModuleWithInstanceVariables
allowed_users
=
@project
.
team
.
users
.
where
(
id:
user_ids
)
# rubocop:disable Gitlab/ModuleWithInstanceVariables
user_ids
.
count
==
allowed_users
.
count
user_ids
.
uniq
.
count
==
allowed_users
.
count
end
# rubocop: enable CodeReuse/ActiveRecord
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment