Skip to content

Commit f12a8fd

Browse files
committed
Bugfix for accepting invitation in client
1 parent 21fe3cb commit f12a8fd

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

client/src/pages/App.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,22 @@ export const App = () => {
5151
return;
5252
}
5353
const pathname = localStorage.getItem("location") || window.location.pathname;
54-
const isInvitationAcceptFlow = window.location.pathname.startsWith("/invitation/accept");
54+
const isInvitationAcceptFlow = window.location.pathname.startsWith("/invitation/accept")
55+
|| pathname.startsWith("/invitation/accept");
56+
let route = null;
5557
if (res.name && !pathname.startsWith("/invitation/accept") && !isInvitationAcceptFlow) {
56-
setLoading(false);
57-
navigate("/deadend");
58+
route = "/deadend"
5859
} else if (pathname === "/" || pathname.startsWith("/login") || pathname.startsWith("/invitation/accept") || isInvitationAcceptFlow) {
5960
setLoading(false);
60-
navigate(isInvitationAcceptFlow ? (window.location.pathname + window.location.search) : pathname);
61+
route = isInvitationAcceptFlow ? pathname : window.location.pathname + window.location.search;
6162
} else {
6263
//Bookmarked URL's trigger a direct login and skip the landing page
6364
login(res);
6465
}
66+
if (!isEmpty(route)) {
67+
setLoading(false);
68+
setTimeout(() => navigate(route), 50);
69+
}
6570
} else {
6671
me()
6772
.then(res => {

server/src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ email:
195195
# configure real users / passwords and test against those. See server/src/main/java/access/manage/ManageConf.java
196196
# and server/src/main/java/access/manage/LocalManage.java to see how it works.
197197
manage:
198-
enabled: True
198+
enabled: False
199199
# enabled: False
200200
url: "https://manage.test2.surfconext.nl"
201201
user: invite

0 commit comments

Comments
 (0)