diff --git a/CHANGELOG.md b/CHANGELOG.md index 955f6313af..f6e314ea7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Add support for scroll anchors in url hash of diff page ([#1304](https://github.com/scm-manager/scm-manager/pull/1304)) +### 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)) 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)); } } }; 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 = () => {