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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Rename AppendContentSecurityPolicy as AppendStoragesHostsToCspHook
Christophe Bliardebcc043b915c
diff --git a/modules/storages/lib/open_project/storages/append_content_security_policy.rb b/modules/storages/lib/open_project/storages/append_storages_hosts_to_csp_hook.rbsimilarity index 96%rename from modules/storages/lib/open_project/storages/append_content_security_policy.rbrename to modules/storages/lib/open_project/storages/append_storages_hosts_to_csp_hook.rbindex 5de8f6b017d..42580a6379d 100644--- a/modules/storages/lib/open_project/storages/append_content_security_policy.rb+++ b/modules/storages/lib/open_project/storages/append_storages_hosts_to_csp_hook.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-class ::OpenProject::Storages::AppendContentSecurityPolicy < OpenProject::Hook::Listener+class ::OpenProject::Storages::AppendStoragesHostsToCspHook < OpenProject::Hook::Listener# OpenProject's front-end needs to allow the browser to connect to external# file servers for direct file uploads. Therefore it needs to extend its# Content Security Policy (CSP) `connect-src` with the hostnames of alldiff --git a/modules/storages/lib/open_project/storages/engine.rb b/modules/storages/lib/open_project/storages/engine.rbindex 6d07068d1b2..01cc5bfed88 100644--- a/modules/storages/lib/open_project/storages/engine.rb+++ b/modules/storages/lib/open_project/storages/engine.rb@@ -93,7 +93,7 @@ module OpenProject::Storages# This hook is executed when the module is loaded.config.to_prepare do# Allow the browser to connect to external servers for direct file uploads.- AppendContentSecurityPolicy+ AppendStoragesHostsToCspHook# We have a bunch of filters defined within the module. Here we register the filters.::Queries::Register.register(::Query) dodiff --git a/modules/storages/spec/lib/append_content_security_policy_spec.rb b/modules/storages/spec/lib/append_storages_hosts_to_csp_hook_spec.rbsimilarity index 98%rename from modules/storages/spec/lib/append_content_security_policy_spec.rbrename to modules/storages/spec/lib/append_storages_hosts_to_csp_hook_spec.rbindex 0865f2779ab..cbceb3d4bde 100644--- a/modules/storages/spec/lib/append_content_security_policy_spec.rb+++ b/modules/storages/spec/lib/append_storages_hosts_to_csp_hook_spec.rb@@ -30,7 +30,7 @@ require_relative '../spec_helper'# These specs mainly check that error messages from a sub-service# (about unsafe hosts with HTTP protocol) are passed to the main form.-describe OpenProject::Storages::AppendContentSecurityPolicy do+describe OpenProject::Storages::AppendStoragesHostsToCspHook doshared_let(:admin) { create(:admin) }shared_let(:project) { create(:project) }let(:storage) { create(:storage) }