Merge pull request #42 from isbadawi/patch-2

Add some more reserved names.
This commit is contained in:
Buu Nguyen 2014-05-14 11:29:06 -07:00
commit 008ed6bc6c
1 changed files with 19 additions and 2 deletions

View File

@ -49,7 +49,24 @@
if (!match) return false
// must not be a reserved `username`
if (~['settings', 'organizations', 'site', 'blog'].indexOf(match[1])) return false
var RESERVED_USERNAMES = [
'settings',
'organizations',
'site',
'blog',
'about',
'orgs',
'styleguide',
'showcases',
'trending',
'stars',
'dashboard',
'notifications'
];
var RESERVED_REPONAMES = ['followers', 'following'];
if (~RESERVED_USERNAMES.indexOf(match[1])) return false
if (~RESERVED_REPONAMES.indexOf(match[2])) return false
// TODO: the intention is to hide the sidebar when users navigate to non-code areas (e.g. Issues, Pulls)
// and show it again when users navigate back to the code area
@ -212,4 +229,4 @@
return localStorage.setItem(key, JSON.stringify(val))
}
}
})()
})()