Skip to content

Commit fd076a7

Browse files
megothrubensworks
authored andcommitted
Allow should call next
1 parent 0fdbe4c commit fd076a7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/handlers/allow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function allow (mode) {
5858
const error = await req.acl.getError(userId, mode)
5959
console.log('ERROR', error)
6060
debug(`${mode} access denied to ${userId || '(none)'}: ${error.status} - ${error.message}`)
61-
res.status(error.status)
61+
next(error)
6262
}
6363
}
6464

test/integration/patch-test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ describe('PATCH', () => {
9090
solid:inserts { <x> <y> <z>. }.`
9191
}, { // expected:
9292
status: 403,
93-
text: 'Forbidden'
93+
text: 'No permission'
9494
}))
9595

9696
describe('on a resource with append-only access', describePatch({
@@ -133,7 +133,7 @@ describe('PATCH', () => {
133133
solid:where { ?a <b> <c>. }.`
134134
}, { // expected:
135135
status: 403,
136-
text: 'Forbidden'
136+
text: 'No permission'
137137
}))
138138

139139
describe('on a resource with append-only access', describePatch({
@@ -223,7 +223,7 @@ describe('PATCH', () => {
223223
solid:deletes { <a> <b> <c>. }.`
224224
}, { // expected:
225225
status: 403,
226-
text: 'Forbidden'
226+
text: 'No permission'
227227
}))
228228

229229
describe('on a resource with append-only access', describePatch({
@@ -318,7 +318,7 @@ describe('PATCH', () => {
318318
solid:deletes { <a> <b> <c>. }.`
319319
}, { // expected:
320320
status: 403,
321-
text: 'Forbidden'
321+
text: 'No permission'
322322
}))
323323

324324
describe('on a resource with append-only access', describePatch({

0 commit comments

Comments
 (0)