Skip to content

Commit e185b50

Browse files
committed
Allow edit of shared parts
1 parent 7ea43f3 commit e185b50

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/auth/access.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ async function getPrivilege (userIds, path) {
6969
let uri = config.get('databasePrefix') + path.substring(1)
7070
let username = path.substring(6, path.indexOf('/', 6))
7171

72+
if (uri.split('/').slice(-2, -1)[0] === 'edit') {
73+
uri = uri.split('/').slice(0, -2).join('/')
74+
}
75+
76+
console.log(uri)
77+
7278
let user = await db.model.User.findAll({
7379
where: {
7480
id: userIds,

0 commit comments

Comments
 (0)