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
Allow state to be redirected to in notifications center
Oliver Günther5dc983cf0a99
diff --git a/app/controllers/angular_controller.rb b/app/controllers/angular_controller.rbindex 26b44a58a22..f20b1b2d3d3 100644--- a/app/controllers/angular_controller.rb+++ b/app/controllers/angular_controller.rb@@ -40,4 +40,8 @@ class AngularController < ApplicationController# but we will need to render with notification specific layoutrender html: '', layout: 'angular/notifications'end++ def login_back_url_params+ params.permit(:state)+ endenddiff --git a/spec/features/notifications/notification_center/notification_center_spec.rb b/spec/features/notifications/notification_center/notification_center_spec.rbindex fd482f6c494..d677a9ebe42 100644--- a/spec/features/notifications/notification_center/notification_center_spec.rb+++ b/spec/features/notifications/notification_center/notification_center_spec.rb@@ -352,4 +352,16 @@ describe "Notification center",endendend++ describe 'logging into deep link', with_settings: { login_required: true } do+ it 'redirects to the notification deep link' do+ visit notifications_center_path(state: "details/#{work_package.id}/activity")++ expect(page).to have_current_path /login/++ login_with recipient.login, 'adminADMIN!', visit_signin_path: false++ expect(page).to have_current_path /notifications\/details\/#{work_package.id}\/activity/+ end+ endend