Skip to content

Commit

Permalink
Do not redirect to missing-service-aup when heading to service-aup
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta authored and baszoetekouw committed Feb 8, 2022
1 parent ef4e7f6 commit b47f001
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/pages/ProtectedRoute.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export function ProtectedRoute({currentUser, Component, redirectToLogin = true,
if (!currentUser.second_factor_confirmed) {
return <Redirect to="/2fa"/>;
}
if (!isEmpty(currentUser.services_without_aup)) {
//Ensure that we are not heading to service-aup which is initiated by eduTeams
if (!isEmpty(currentUser.services_without_aup) && window.location.href.indexOf("service-aup") === -1) {
return <Redirect to="/missing-service-aup"/>;
}
return <Route render={props => <Component user={currentUser} {...res} {...props}/>}/>;
Expand Down

0 comments on commit b47f001

Please sign in to comment.