Commit 3156976f authored by Ben Wheeler's avatar Ben Wheeler

update method of checking goodlist of pages for banned user to see

parent fdf05f94
......@@ -12,10 +12,11 @@ const Types = keyMirror({
SET_STATUS: null
});
const banWhitelistPaths = [
'/accounts/banned-response/',
'/community_guidelines/',
'/community_guidelines'
const banGoodListPaths = [
'/accounts/banned-response',
'/community_guidelines',
'/privacy_policy',
'/terms_of_use'
];
module.exports.Status = keyMirror({
......@@ -67,7 +68,7 @@ const handleSessionResponse = (dispatch, body) => {
if (
body.user &&
body.user.banned &&
banWhitelistPaths.indexOf(window.location.pathname) === -1
banGoodListPaths.every(goodPath => window.location.pathname.indexOf(goodPath) === -1)
) {
window.location = '/accounts/banned-response/';
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment