feat: block creating pages with system reserved paths

This commit is contained in:
Nick committed 2019-04-19 20:45:05 -04:00
1 parent e597a7df1a
commit 5b64c95117
5 files changed
+22 -6

No files matched your search

+6
View File
@@ -56,5 +56,11 @@ module.exports = {
default:
return page.content
}
},
/**
* Check if path is a reserved path
*/
isReservedPath(rawPath)  {
return _.some(WIKI.data.reservedPaths, p => _.startsWith(rawPath, p))
}
}