Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
3156976f
Commit
3156976f
authored
May 05, 2021
by
Ben Wheeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update method of checking goodlist of pages for banned user to see
parent
fdf05f94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/redux/session.js
src/redux/session.js
+6
-5
No files found.
src/redux/session.js
View file @
3156976f
...
...
@@ -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
&&
ban
WhitelistPaths
.
indexOf
(
window
.
location
.
pathname
)
===
-
1
ban
GoodListPaths
.
every
(
goodPath
=>
window
.
location
.
pathname
.
indexOf
(
goodPath
)
===
-
1
)
)
{
window
.
location
=
'
/accounts/banned-response/
'
;
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment