Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ workflows:
branches:
only:
- develop
- topgear-login-redirect
# This is alternate dev env for parallel testing
- "build-test":
context : org-global
Expand All @@ -361,14 +362,15 @@ workflows:
filters:
branches:
only:
- thrive-bug-fixes2
- free
# This is stage env for production QA releases
- "build-prod-staging":
context : org-global
filters: &filters-staging
branches:
only:
- develop
- topgear-login-redirect
# Production builds are exectuted
# when PR is merged to the master
# Don't change anything in this configuration
Expand Down
20 changes: 9 additions & 11 deletions src/shared/containers/tc-communities/Loader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,19 @@ class Loader extends React.Component {
!meta /* || (Date.now() - meta.timestamp) > MAXAGE */
)) nextProps.loadMetaData(communityId, tokenV3);

/* TODO: This is a hacky way to handle SSO authentication for TopGear
* (Wipro) and Zurich community visitors. Should be re-factored, but not it is not
* clear, what exactly do we need to support it in general. */
if ((communityId === 'wipro' || communityId === 'comcast') && !visitorGroups) {
/* TODO: This is a hacky way to handle SSO authentication for TopGear */
if (communityId === 'comcast' && !visitorGroups) {
const returnUrl = encodeURIComponent(window.location.href);
if (communityId === 'wipro') {
window.location = `${config.URL.AUTH}/?retUrl=${config.URL.TOPGEAR}`;
}
window.location = `${config.URL.AUTH}/member?retUrl=${returnUrl}&utm_source=${communityId}`;
}

/* Redirect odl TopGear home to new TopGear App */
if (communityId === 'wipro'
&& (window.location.pathname === '/' || window.location.pathname === '/__community__/wipro')) {
window.location = config.URL.TOPGEAR;
/* Redirect old TopGear home to new TopGear App and login redirect */
if (communityId === 'wipro') {
if (!visitorGroups) {
window.location = `${config.URL.AUTH}/?retUrl=${config.URL.TOPGEAR}&utm_source=${communityId}`;
} else if (window.location.pathname === '/' || window.location.pathname === '/__community__/wipro') {
window.location = config.URL.TOPGEAR;
}
}
}

Expand Down