Skip to content

Commit

Permalink
DataTransferPublicPagesRest: don't show access token in login form. L…
Browse files Browse the repository at this point in the history
…ogin fixed.
  • Loading branch information
kreinhard committed Feb 12, 2025
1 parent 74c7e4d commit cc0eb7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,6 @@ class DataTransferPublicPageRest : AbstractDynamicPageRest() {
}

formCol
.add(
UIInput(
"externalAccessToken",
required = true,
label = "plugins.datatransfer.external.accessToken",
autoComplete = UIInput.AutoCompleteType.USERNAME
)
)
.add(
UIInput(
"externalPassword",
Expand Down
6 changes: 5 additions & 1 deletion projectforge-webapp/src/actions/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ export const loadUserStatus = () => (dispatch) => {
));
})
.catch(() => {
if (!window.location.href.endsWith('/react/public/login')) {
const { href } = window.location;
if (!href.endsWith('/react/public/login')
// /react/public/datatransfer/ is a special case where the user is not logged in.
// Login form is returned by data transfer.
&& href.indexOf('/react/public/datatransfer/') < 0) {
window.location.href = '/react/public/login';
}

Expand Down

0 comments on commit cc0eb7b

Please sign in to comment.