summaryrefslogtreecommitdiff
path: root/lib/api/internal/kubernetes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/internal/kubernetes.rb')
-rw-r--r--lib/api/internal/kubernetes.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/internal/kubernetes.rb b/lib/api/internal/kubernetes.rb
index d4690709de4..73723a96401 100644
--- a/lib/api/internal/kubernetes.rb
+++ b/lib/api/internal/kubernetes.rb
@@ -85,9 +85,7 @@ module API
get '/project_info' do
project = find_project(params[:id])
- # TODO sort out authorization for real
- # https://gitlab.com/gitlab-org/gitlab/-/issues/220912
- unless Ability.allowed?(nil, :download_code, project)
+ unless Guest.can?(:download_code, project) || agent.has_access_to?(project)
not_found!
end
@@ -123,3 +121,5 @@ module API
end
end
end
+
+API::Internal::Kubernetes.prepend_if_ee('EE::API::Internal::Kubernetes')