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
Fix CSP for augur host
Oliver Günther823574d25131
diff --git a/app/controllers/enterprises_controller.rb b/app/controllers/enterprises_controller.rbindex a2c074388dd..7108a412ca5 100644--- a/app/controllers/enterprises_controller.rb+++ b/app/controllers/enterprises_controller.rb@@ -101,7 +101,7 @@ class EnterprisesController < ApplicationControllerenddef write_augur_to_gon- gon.augur_url = Rails.env.production? ? OpenProject::Configuration[:enterprise_trial_creation_host] : 'https://augur.openproject-edge.com'+ gon.augur_url = OpenProject::Configuration.enterprise_trial_creation_hostenddef default_breadcrumbdiff --git a/app/helpers/enterprise_trial_helper.rb b/app/helpers/enterprise_trial_helper.rbindex 2e2d51c8d62..e63a87094a4 100644--- a/app/helpers/enterprise_trial_helper.rb+++ b/app/helpers/enterprise_trial_helper.rb@@ -1,7 +1,7 @@module EnterpriseTrialHelperdef augur_content_security_policyappend_content_security_policy_directives(- connect_src: %w(augur.openproject-edge.com)+ connect_src: [OpenProject::Configuration.enterprise_trial_creation_host])enddiff --git a/lib/open_project/configuration/helpers.rb b/lib/open_project/configuration/helpers.rbindex 712868a434b..536bcf3a5fc 100644--- a/lib/open_project/configuration/helpers.rb+++ b/lib/open_project/configuration/helpers.rb@@ -41,6 +41,15 @@ module OpenProject(self['attachments_storage'] || 'file').to_symend+ # Augur connect host+ def enterprise_trial_creation_host+ if Rails.env.production?+ self['enterprise_trial_creation_host']+ else+ 'https://augur.openproject-edge.com'+ end+ end+def file_storage?attachments_storage == :fileend