summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-11-03 12:04:41 +0100
committerRémy Coutable <remy@rymai.me>2016-11-04 12:42:19 +0100
commit5f1d3ec59ab5cbef568d80a8c03d212fadf4cda9 (patch)
treecdfefc4379f427da68f13413e0c6dbe57c856b64
parent5ef2bd192aa9b3ecbfc23e83c6984e2a818fb736 (diff)
downloadgitlab-ce-23961-can-t-share-project-with-groups.tar.gz
Only skip group when it's actually a group in the "Share with group" select23961-can-t-share-project-with-groups
Signed-off-by: Rémy Coutable <remy@rymai.me>
-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: