From abedebda10ac07cc5acbc38de0a8daf560d1202e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Pfeuffer?= Date: Wed, 2 Sep 2020 10:18:42 +0200 Subject: [PATCH 1/3] Fix redirect to requested location in anonymous mode If anonymous mode is enabled, the user should be redirected to the requested location after login, when he entered a restricted URL. Therefore we have to append the requested location to the login link here. --- scm-ui/ui-components/src/ErrorBoundary.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scm-ui/ui-components/src/ErrorBoundary.tsx b/scm-ui/ui-components/src/ErrorBoundary.tsx index 33c8a48494..3d0144b95b 100644 --- a/scm-ui/ui-components/src/ErrorBoundary.tsx +++ b/scm-ui/ui-components/src/ErrorBoundary.tsx @@ -72,10 +72,10 @@ class ErrorBoundary extends React.Component { } redirectToLogin = (error: Error) => { - const { loginLink } = this.props; + const { loginLink, location } = this.props; if (error instanceof MissingLinkError) { if (loginLink) { - window.location.assign(withContextPath("/login")); + window.location.assign(withContextPath("/login?from=" + location.pathname)); } } }; From b60b737712e05f56fbea7059ba01f7d6b0a2e41a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Pfeuffer?= Date: Wed, 2 Sep 2020 10:25:56 +0200 Subject: [PATCH 2/3] Log chage --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d469b6fd5..c0d5ea7ff0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased +### Fixed +- Redirection to requested page after login in anonymous mode + ## [2.4.1] - 2020-09-01 ### Added - Add "sonia.scm.restart-migration.wait" to set wait in milliseconds before restarting scm-server after migration ([#1308](https://github.com/scm-manager/scm-manager/pull/1308)) From 43b1c7e2d9383aab8d00c6637320f45053bdb7e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Pfeuffer?= Date: Wed, 2 Sep 2020 10:41:02 +0200 Subject: [PATCH 3/3] Set new version in all package.json files --- scm-ui/ui-scripts/src/lerna.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/scm-ui/ui-scripts/src/lerna.js b/scm-ui/ui-scripts/src/lerna.js index c0250e1385..3b9af49e3a 100644 --- a/scm-ui/ui-scripts/src/lerna.js +++ b/scm-ui/ui-scripts/src/lerna.js @@ -37,16 +37,8 @@ const yarn = args => { } }; -const version = version => { - yarn([ - "run", - "lerna", - "--no-git-tag-version", - "--no-push", - "version", - "--yes", - version - ]); +const version = v => { + yarn(["run", "lerna", "--no-git-tag-version", "--no-push", "version", "--force-publish", "--yes", v]); }; const publish = () => {