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

Set default issuer

Oliver Günther0959dcadb3a8
diff --git a/modules/openid_connect/app/services/openid_connect/providers/set_attributes_service.rb b/modules/openid_connect/app/services/openid_connect/providers/set_attributes_service.rb
index ec1879e64a0..e0b2cbec241 100644
--- a/modules/openid_connect/app/services/openid_connect/providers/set_attributes_service.rb
+++ b/modules/openid_connect/app/services/openid_connect/providers/set_attributes_service.rb
@@ -31,8 +31,9 @@ module OpenIDConnect
class SetAttributesService < BaseServices::SetAttributes
private
- def set_default_attributes(*)
+ def set_default_attributes(*) # rubocop:disable Metrics/AbcSize
model.change_by_system do
+ model.issuer ||= OpenProject::StaticRouting::StaticUrlHelpers.new.root_url
model.creator ||= user
model.slug ||= "#{model.class.slug_fragment}-#{model.display_name.to_url}" if model.display_name
end