Explorar el Código

Strip out edit and create from start of path

Fixes the issue that requires you to add extra permission sets for `/create/...` and `/edit/...`

Fixes #147
Amaan Mawji hace 7 años
padre
commit
63924e6c8e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      server/libs/rights.js

+ 1 - 1
server/libs/rights.js

@@ -56,7 +56,7 @@ module.exports = {
       manage: false
     }
     let rt = []
-    let p = _.chain(req.originalUrl).toLower().trim().value()
+    let p = _.chain(req.originalUrl).toLower().trim().replace(/^\/(edit|create)/, '').value()
 
     // Load user rights