summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-11-04 13:46:21 +0000
committerRobert Speicher <robert@gitlab.com>2016-11-04 13:46:21 +0000
commita3cc2f1e8dfcfb2f3e181fa570ed2ba245f9a069 (patch)
tree4f8f8ee19b9426ad8e912bbfe0fca9c826edfed7
parente4c05de75ccec1b0d64a7a994f05d54bffc903e5 (diff)
parent5f1d3ec59ab5cbef568d80a8c03d212fadf4cda9 (diff)
downloadgitlab-ce-a3cc2f1e8dfcfb2f3e181fa570ed2ba245f9a069.tar.gz
Merge branch '23961-can-t-share-project-with-groups' into 'master'
Only skip group when it's actually a group in the "Share with group" select Fixes #23961 See merge request !7262
-rw-r--r--app/controllers/projects/group_links_controller.rb2
-rw-r--r--changelogs/unreleased/23961-can-t-share-project-with-groups.yml4
2 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/projects/group_links_controller.rb b/app/controllers/projects/group_links_controller.rb
index ae060abee5c..9eaf26a0dbf 100644
--- a/app/controllers/projects/group_links_controller.rb
+++ b/app/controllers/projects/group_links_controller.rb
@@ -7,7 +7,7 @@ class Projects::GroupLinksController < Projects::ApplicationController
@group_links = project.project_group_links.all
@skip_groups = @group_links.pluck(:group_id)
- @skip_groups << project.group.try(:id)
+ @skip_groups << project.namespace_id unless project.personal?
end
def create
diff --git a/changelogs/unreleased/23961-can-t-share-project-with-groups.yml b/changelogs/unreleased/23961-can-t-share-project-with-groups.yml
new file mode 100644
index 00000000000..b3bfcbda4b7
--- /dev/null
+++ b/changelogs/unreleased/23961-can-t-share-project-with-groups.yml
@@ -0,0 +1,4 @@
+---
+title: Only skip group when it's actually a group in the "Share with group" select
+merge_request: 7262
+author: