mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-25 12:20:24 -04:00
Don’t redirect banned user on comm. guideliens
Goes along with https://github.com/LLK/scratchr2/pull/4127.
This commit is contained in:
parent
603a1336ce
commit
e1e9455866
1 changed files with 6 additions and 1 deletions
|
@ -10,6 +10,11 @@ var Types = keyMirror({
|
|||
SET_STATUS: null
|
||||
});
|
||||
|
||||
const BAN_WHITELIST_PATHS = [
|
||||
'/accounts/banned-response/',
|
||||
'/community_guidelines/'
|
||||
];
|
||||
|
||||
module.exports.Status = keyMirror({
|
||||
FETCHED: null,
|
||||
NOT_FETCHED: null,
|
||||
|
@ -71,7 +76,7 @@ module.exports.refreshSession = function () {
|
|||
if (
|
||||
body.user &&
|
||||
body.user.banned &&
|
||||
window.location.pathname !== '/accounts/banned-response/') {
|
||||
BAN_WHITELIST_PATHS.indexOf(window.location.pathname) === -1) {
|
||||
return window.location = '/accounts/banned-response/';
|
||||
} else if (
|
||||
body.flags &&
|
||||
|
|
Loading…
Add table
Reference in a new issue