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
8821b8be
Commit
8821b8be
authored
Feb 20, 2019
by
Małgorzata Ksionek
Committed by
Jarka Košanová
Mar 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update group links service
parent
e04e585c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
1 deletion
+12
-1
ee/app/services/ee/projects/group_links/create_service.rb
ee/app/services/ee/projects/group_links/create_service.rb
+4
-1
ee/changelogs/unreleased/2802-security-add-public-internal-groups-as-members-to-your-project-idor.yml
...ublic-internal-groups-as-members-to-your-project-idor.yml
+6
-0
ee/spec/features/projects/members/invite_group_and_members_spec.rb
...eatures/projects/members/invite_group_and_members_spec.rb
+1
-0
ee/spec/services/projects/group_links/create_service_spec.rb
ee/spec/services/projects/group_links/create_service_spec.rb
+1
-0
No files found.
ee/app/services/ee/projects/group_links/create_service.rb
View file @
8821b8be
...
...
@@ -8,7 +8,10 @@ module EE
override
:execute
def
execute
(
group
)
super
.
tap
{
|
link
|
log_audit_event
(
link
)
if
link
&&
link
&
.
persisted?
}
result
=
super
log_audit_event
(
result
[
:link
])
if
result
[
:status
]
==
:success
result
end
private
...
...
ee/changelogs/unreleased/2802-security-add-public-internal-groups-as-members-to-your-project-idor.yml
0 → 100644
View file @
8821b8be
---
title
:
Remove the possibility to share a project with a group that a user is not a member
of
merge_request
:
author
:
type
:
security
ee/spec/features/projects/members/invite_group_and_members_spec.rb
View file @
8821b8be
...
...
@@ -57,6 +57,7 @@ describe 'Project > Members > Invite group and members', :js do
before
do
project
.
add_maintainer
(
maintainer
)
group_to_share_with
.
add_developer
(
maintainer
)
sign_in
(
maintainer
)
end
...
...
ee/spec/services/projects/group_links/create_service_spec.rb
View file @
8821b8be
...
...
@@ -36,6 +36,7 @@ describe Projects::GroupLinks::CreateService, '#execute' do
end
def
create_group_link
(
user
,
project
,
group
,
opts
)
group
.
add_developer
(
user
)
described_class
.
new
(
project
,
user
,
opts
).
execute
(
group
)
end
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