We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ea43f3 commit e185b50Copy full SHA for e185b50
lib/auth/access.js
@@ -69,6 +69,12 @@ async function getPrivilege (userIds, path) {
69
let uri = config.get('databasePrefix') + path.substring(1)
70
let username = path.substring(6, path.indexOf('/', 6))
71
72
+ if (uri.split('/').slice(-2, -1)[0] === 'edit') {
73
+ uri = uri.split('/').slice(0, -2).join('/')
74
+ }
75
+
76
+ console.log(uri)
77
78
let user = await db.model.User.findAll({
79
where: {
80
id: userIds,
0 commit comments