Skip to content

Commit 63924e6

Browse files
amaanmNGPixel
authored andcommitted
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
1 parent df3ec91 commit 63924e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/libs/rights.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module.exports = {
5656
manage: false
5757
}
5858
let rt = []
59-
let p = _.chain(req.originalUrl).toLower().trim().value()
59+
let p = _.chain(req.originalUrl).toLower().trim().replace(/^\/(edit|create)/, '').value()
6060

6161
// Load user rights
6262

0 commit comments

Comments
 (0)