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
add openid providers to gaurded actions and fix related changes, add icon beside it in menu
bsatarnejaded55b7a57b6a
diff --git a/app/services/authorization/enterprise_service.rb b/app/services/authorization/enterprise_service.rbindex 7112af57809..0a4a131b0e8 100644--- a/app/services/authorization/enterprise_service.rb+++ b/app/services/authorization/enterprise_service.rb@@ -46,6 +46,7 @@ class Authorization::EnterpriseServicegrid_widget_wp_graphplaceholder_usersteam_planner_view+ openid_providers).freezedef initialize(token)diff --git a/modules/openid_connect/app/controllers/openid_connect/providers_controller.rb b/modules/openid_connect/app/controllers/openid_connect/providers_controller.rbindex b0cecf01862..58de9fddf58 100644--- a/modules/openid_connect/app/controllers/openid_connect/providers_controller.rb+++ b/modules/openid_connect/app/controllers/openid_connect/providers_controller.rb@@ -55,7 +55,7 @@ module OpenIDConnectprivatedef check_ee- if EnterpriseToken.show_banners?+ unless EnterpriseToken.allows_to?(:openid_providers)render template: '/openid_connect/providers/upsale'falseenddiff --git a/modules/openid_connect/lib/open_project/openid_connect/engine.rb b/modules/openid_connect/lib/open_project/openid_connect/engine.rbindex 3af78d2a767..caee4c72368 100644--- a/modules/openid_connect/lib/open_project/openid_connect/engine.rb+++ b/modules/openid_connect/lib/open_project/openid_connect/engine.rb@@ -15,7 +15,8 @@ module OpenProject::OpenIDConnect:plugin_openid_connect,:openid_connect_providers_path,parent: :authentication,- caption: ->(*) { I18n.t('openid_connect.menu_title') }+ caption: ->(*) { I18n.t('openid_connect.menu_title') },+ enterprise_feature: 'openid_connect'endassets %w(diff --git a/modules/openid_connect/spec/controllers/providers_controller_spec.rb b/modules/openid_connect/spec/controllers/providers_controller_spec.rbindex e9f7439ecbc..ad2e0347bfd 100644--- a/modules/openid_connect/spec/controllers/providers_controller_spec.rb+++ b/modules/openid_connect/spec/controllers/providers_controller_spec.rb@@ -42,7 +42,7 @@ describe ::OpenIDConnect::ProvidersController, type: :controller dobefore dologin_as user- allow(EnterpriseToken).to receive(:show_banners?).and_return(!ee)+ allow(EnterpriseToken).to receive(:openid_providers?).and_return(!ee)endcontext 'when not ee' dodiff --git a/modules/openid_connect/spec/requests/openid_connect_spec.rb b/modules/openid_connect/spec/requests/openid_connect_spec.rbindex e206e0b799e..ccd21ba987e 100644--- a/modules/openid_connect/spec/requests/openid_connect_spec.rb+++ b/modules/openid_connect/spec/requests/openid_connect_spec.rb@@ -48,7 +48,7 @@ describe 'OpenID Connect',endbefore do- allow(EnterpriseToken).to receive(:show_banners?).and_return(false)+ allow(EnterpriseToken).to receive(:openid_providers?).and_return(false)# The redirect will include an authorisation code.# Since we don't actually get a valid code in the test we will stub the resulting AccessToken.@@ -149,7 +149,7 @@ describe 'OpenID Connect',endit 'will show no option unless EE' do- allow(EnterpriseToken).to receive(:show_banners?).and_return(true)+ allow(EnterpriseToken).to receive(:openid_providers?).and_return(true)get '/login'expect(response.body).not_to match /Google/iexpect(response.body).not_to match /Azure/i