Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Revert "fix[Op#50737]: Remove unused form closing method check"

Kabiru Mwenja2d59cfb42df8
diff --git a/modules/storages/app/components/storages/admin/storage_view_component.html.erb b/modules/storages/app/components/storages/admin/storage_view_component.html.erb
index 088a1b9f099..552a71467cf 100644
--- a/modules/storages/app/components/storages/admin/storage_view_component.html.erb
+++ b/modules/storages/app/components/storages/admin/storage_view_component.html.erb
@@ -30,7 +30,7 @@
component.with_row(scheme: :default) do
render(OpTurbo::FrameComponent.new(id: :storage_openproject_oauth_section)) do
- if storage.new_record?
+ if storage.new_record? || openproject_oauth_application_section_closed?
render(Storages::Admin::OAuthApplicationInfoComponent.new(oauth_application:, storage:))
else
render(
diff --git a/modules/storages/app/components/storages/admin/storage_view_component.rb b/modules/storages/app/components/storages/admin/storage_view_component.rb
index e60cb3cad44..ba01ef49f06 100644
--- a/modules/storages/app/components/storages/admin/storage_view_component.rb
+++ b/modules/storages/app/components/storages/admin/storage_view_component.rb
@@ -33,8 +33,15 @@ module Storages::Admin
include OpPrimer::ComponentHelpers
include StorageViewInformation
+ options openproject_oauth_application_section_open: false
+
alias_method :storage, :model
+ alias_method :openproject_oauth_application_section_open?, :openproject_oauth_application_section_open
delegate :oauth_application, to: :model
+
+ def openproject_oauth_application_section_closed?
+ !openproject_oauth_application_section_open?
+ end
end
end