Repository navigation
Enabling POD providers to enforce a Terms & Conditions #892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
d8003f5
Adding options to handle T&C
megoth b02bf0d
Added checkbox to register-form
megoth f40d80e
Conditionally enforcing acceptToc when creating account
megoth 2c324d9
A little cleanup
megoth 04babec
A simple, configurable solution to blacklist usernames
megoth 8922bdd
Making test a bit more explicit
megoth 46bdd70
Update README.md
kjetilk 5980af7
Moved all services to its own service-directory
megoth db0d55b
Merge branch 'feature/blacklist-username' of https://github.com/solid…
megoth 93d7482
Merge pull request #893 from solid/feature/blacklist-username
kjetilk 75c01e5
Adding options to handle T&C
megoth 7685360
Added checkbox to register-form
megoth 8d5ee92
Conditionally enforcing acceptToc when creating account
megoth 6f0fd7b
A little cleanup
megoth 1235e3f
Fixed minor nits
megoth 7ef3e40
Merge remote-tracking branch 'origin/feature/link-toc' into feature/l…
megoth d7475ff
Just added properties to config.json-default
megoth 57cfd18
Adding options to handle T&C
megoth 6d6fe00
Added checkbox to register-form
megoth 2526047
Conditionally enforcing acceptToc when creating account
megoth 9c96aee
A little cleanup
megoth b18f0b8
Fixed minor nits
megoth 13d8ce1
Just added properties to config.json-default
megoth 38252d7
Merge branch 'feature/link-toc' of https://github.com/solid/node-soli…
megoth df438cc
Removed handlebars-helpers because of security vulnerability
megoth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,5 +14,7 @@ | |
| "name": "", | ||
| "description": "", | ||
| "logo": "" | ||
| } | ||
| }, | ||
| "enforceToc": true, | ||
| "tocUri": "https://your-toc" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "useTheBigUsernameBlacklist": true, | ||
| "customBlacklistedUsernames": [] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| const blacklistConfig = require('../../config/usernames-blacklist.json') | ||
| const blacklist = require('the-big-username-blacklist').list | ||
|
|
||
| class BlacklistService { | ||
| constructor () { | ||
| this.reset() | ||
| } | ||
|
|
||
| addWord (word) { | ||
| this.list.push(BlacklistService._prepareWord(word)) | ||
| } | ||
|
|
||
| reset (config) { | ||
| this.list = BlacklistService._initList(config) | ||
| } | ||
|
|
||
| validate (word) { | ||
| return this.list.indexOf(BlacklistService._prepareWord(word)) === -1 | ||
| } | ||
|
|
||
| static _initList (config = blacklistConfig) { | ||
| return [ | ||
| ...(config.useTheBigUsernameBlacklist ? blacklist : []), | ||
| ...config.customBlacklistedUsernames | ||
| ] | ||
| } | ||
|
|
||
| static _prepareWord (word) { | ||
| return word.trim().toLocaleLowerCase() | ||
| } | ||
| } | ||
|
|
||
| module.exports = new BlacklistService() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code duplication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are two different classes, so think I'll let it be as is.
But we might want to separate these classes a bit more in the future, i.e. having them in separate files.
create-account-requestis getting difficult to read.