summaryrefslogtreecommitdiff
path: root/app/controllers/groups
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-14 00:08:59 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-14 00:08:59 +0000
commit13d294a8d8be05421e7d5e34577033ba5b34059c (patch)
treef9aab2c3930cb85e9afbb111063930a1bdd1c156 /app/controllers/groups
parenta269fb8e7cca24b826dd3f53485641ffce93bbee (diff)
downloadgitlab-ce-13d294a8d8be05421e7d5e34577033ba5b34059c.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/groups')
-rw-r--r--app/controllers/groups/harbor/application_controller.rb16
-rw-r--r--app/controllers/groups/harbor/artifacts_controller.rb15
-rw-r--r--app/controllers/groups/harbor/repositories_controller.rb17
-rw-r--r--app/controllers/groups/harbor/tags_controller.rb15
4 files changed, 50 insertions, 13 deletions
diff --git a/app/controllers/groups/harbor/application_controller.rb b/app/controllers/groups/harbor/application_controller.rb
new file mode 100644
index 00000000000..cff767c8efd
--- /dev/null
+++ b/app/controllers/groups/harbor/application_controller.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+module Groups
+ module Harbor
+ class ApplicationController < Groups::ApplicationController
+ layout 'group'
+ include ::Harbor::Access
+
+ private
+
+ def authorize_read_harbor_registry!
+ render_404 unless can?(current_user, :read_harbor_registry, @group)
+ end
+ end
+ end
+end
diff --git a/app/controllers/groups/harbor/artifacts_controller.rb b/app/controllers/groups/harbor/artifacts_controller.rb
new file mode 100644
index 00000000000..b7570b44a2c
--- /dev/null
+++ b/app/controllers/groups/harbor/artifacts_controller.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module Groups
+ module Harbor
+ class ArtifactsController < ::Groups::Harbor::ApplicationController
+ include ::Harbor::Artifact
+
+ private
+
+ def container
+ @group
+ end
+ end
+ end
+end
diff --git a/app/controllers/groups/harbor/repositories_controller.rb b/app/controllers/groups/harbor/repositories_controller.rb
index 364607f9b20..1ad38bd7103 100644
--- a/app/controllers/groups/harbor/repositories_controller.rb
+++ b/app/controllers/groups/harbor/repositories_controller.rb
@@ -2,22 +2,13 @@
module Groups
module Harbor
- class RepositoriesController < Groups::ApplicationController
- feature_category :integrations
-
- before_action :harbor_registry_enabled!
- before_action do
- push_frontend_feature_flag(:harbor_registry_integration)
- end
-
- def show
- render :index
- end
+ class RepositoriesController < ::Groups::Harbor::ApplicationController
+ include ::Harbor::Repository
private
- def harbor_registry_enabled!
- render_404 unless Feature.enabled?(:harbor_registry_integration)
+ def container
+ @group
end
end
end
diff --git a/app/controllers/groups/harbor/tags_controller.rb b/app/controllers/groups/harbor/tags_controller.rb
new file mode 100644
index 00000000000..da43cb3f64c
--- /dev/null
+++ b/app/controllers/groups/harbor/tags_controller.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module Groups
+ module Harbor
+ class TagsController < ::Groups::Harbor::ApplicationController
+ include ::Harbor::Tag
+
+ private
+
+ def container
+ @group
+ end
+ end
+ end
+end