summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-07-28 13:38:47 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2016-07-28 13:38:47 -0400
commit12fe314b26042c2508dcb850f5ecdd7794d6c982 (patch)
tree8a8e2e5d1090082fb7d0b4c79f1e04f290a9dbb3
parent6dc7ea6ab267b18193a9a5a034d0762a7b1cce6c (diff)
downloadchat-12fe314b26042c2508dcb850f5ecdd7794d6c982.tar.gz
chat-12fe314b26042c2508dcb850f5ecdd7794d6c982.tar.bz2
chat-12fe314b26042c2508dcb850f5ecdd7794d6c982.zip
PLT-3687 Restrict the name "matterbot" from usernames (#3686)
-rw-r--r--model/user.go1
-rw-r--r--webapp/utils/constants.jsx3
2 files changed, 3 insertions, 1 deletions
diff --git a/model/user.go b/model/user.go
index 2a7427748..bad616d73 100644
--- a/model/user.go
+++ b/model/user.go
@@ -413,6 +413,7 @@ var validUsernameChars = regexp.MustCompile(`^[a-z0-9\.\-_]+$`)
var restrictedUsernames = []string{
"all",
"channel",
+ "matterbot",
}
func IsValidUsername(s string) bool {
diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx
index 207ec5811..2b7a1564e 100644
--- a/webapp/utils/constants.jsx
+++ b/webapp/utils/constants.jsx
@@ -310,7 +310,8 @@ export const Constants = {
'valet',
'all',
'channel',
- 'here'
+ 'here',
+ 'matterbot'
],
MONTHS: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
MAX_DMS: 20,