Browse Source

fix(page): Add rules creatable name

Closes #33
Keisuke SATO 10 years ago
parent
commit
d5618b1fcb
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/models/page.js

+ 2 - 1
lib/models/page.js

@@ -183,11 +183,12 @@ module.exports = function(crowi) {
 
 
   pageSchema.statics.isCreatableName = function(name) {
   pageSchema.statics.isCreatableName = function(name) {
     var forbiddenPages = [
     var forbiddenPages = [
-      /\^|\$|\*|\+/,
+      /\^|\$|\*|\+|\#/,
       /^\/_api\/.*/,
       /^\/_api\/.*/,
       /^\/\-\/.*/,
       /^\/\-\/.*/,
       /^\/_r\/.*/,
       /^\/_r\/.*/,
       /.+\/edit$/,
       /.+\/edit$/,
+      /\/$/,
       /^\/(installer|register|login|logout|admin|me|files|trash|paste|comments).+/,
       /^\/(installer|register|login|logout|admin|me|files|trash|paste|comments).+/,
     ];
     ];