diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-03-17 03:23:59 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-03-17 03:23:59 +0300 |
commit | a18ac62756573a2da2c42ca50b6f30033be6fa63 (patch) | |
tree | 6f95ea299b1accf8cbc559478a59eeaeeb15d95b /app/finders | |
parent | 44c127447b5a3cfc7aaea6f19e18baf9f42ad500 (diff) |
Block internal groups/projects visibility to external users
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/contributed_projects_finder.rb | 2 | ||||
-rw-r--r-- | app/finders/joined_groups_finder.rb | 2 | ||||
-rw-r--r-- | app/finders/personal_projects_finder.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/app/finders/contributed_projects_finder.rb b/app/finders/contributed_projects_finder.rb index 0209649b017..4f7fe1c748b 100644 --- a/app/finders/contributed_projects_finder.rb +++ b/app/finders/contributed_projects_finder.rb @@ -11,7 +11,7 @@ class ContributedProjectsFinder # # Returns an ActiveRecord::Relation. def execute(current_user = nil) - if current_user + if current_user && !current_user.external? relation = projects_visible_to_user(current_user) else relation = public_projects diff --git a/app/finders/joined_groups_finder.rb b/app/finders/joined_groups_finder.rb index fbdf492c965..ff744689e3d 100644 --- a/app/finders/joined_groups_finder.rb +++ b/app/finders/joined_groups_finder.rb @@ -12,7 +12,7 @@ class JoinedGroupsFinder # # Returns an ActiveRecord::Relation. def execute(current_user = nil) - if current_user + if current_user && !current_user.external? relation = groups_visible_to_user(current_user) else relation = public_groups diff --git a/app/finders/personal_projects_finder.rb b/app/finders/personal_projects_finder.rb index a61ffa22990..0e2d915da54 100644 --- a/app/finders/personal_projects_finder.rb +++ b/app/finders/personal_projects_finder.rb @@ -11,7 +11,7 @@ class PersonalProjectsFinder # # Returns an ActiveRecord::Relation. def execute(current_user = nil) - if current_user + if current_user && !current_user.external? relation = projects_visible_to_user(current_user) else relation = public_projects |