From c1373094fc5c1625d3efe2ea181e12997a30566e Mon Sep 17 00:00:00 2001 From: MontrealSergiy Date: Thu, 12 Jun 2025 16:10:15 -0400 Subject: [PATCH] hide public projects from invite by project #1499 --- BrainPortal/app/views/groups/_users_form.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BrainPortal/app/views/groups/_users_form.html.erb b/BrainPortal/app/views/groups/_users_form.html.erb index 9e17a77a1..060feba3c 100644 --- a/BrainPortal/app/views/groups/_users_form.html.erb +++ b/BrainPortal/app/views/groups/_users_form.html.erb @@ -29,11 +29,11 @@ %> <% - @other_work_groups = WorkGroup.all.select { |g| g != @group && g.can_be_accessed_by?(current_user) } + @other_work_groups = WorkGroup.all.select { |g| g != @group && g.can_be_accessed_by?(current_user) && ! g.public? } @other_work_groups = @other_work_groups.reject { |g| g.invisible? } if ! current_user.has_role?(:admin_user) @other_work_groups.sort! { |a,b| a.name.casecmp(b.name) } - @other_site_groups = SiteGroup.all.select { |g| g != @group && g.can_be_accessed_by?(current_user) } + @other_site_groups = SiteGroup.all.select { |g| g != @group && g.can_be_accessed_by?(current_user) && ! g.public? } @other_site_groups.sort! { |a,b| a.name.casecmp(b.name) } user_ids = @users.index_by &:id