Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.7.9 beta #1750

Merged
merged 40 commits into from
Feb 6, 2024
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
2dd0789
allow PUT Append for new resource
bourgeoa Nov 28, 2023
208c67b
Merge branch 'main' into appendPutNewDocument
bourgeoa Dec 18, 2023
47100fc
Append with PUT
bourgeoa Dec 19, 2023
990eff0
update check itemName
bourgeoa Dec 23, 2023
9fe8003
mocha is not exiting
bourgeoa Dec 26, 2023
dabea82
Merge branch 'issue#1743' into alain-global
bourgeoa Dec 26, 2023
0185d3c
5.7.9-alpha
bourgeoa Dec 26, 2023
e17beb8
409 itemName and contentTypen in PATCH
bourgeoa Dec 26, 2023
3e6db72
Merge branch 'issue#1743' into 5.7.9-alpha
bourgeoa Dec 26, 2023
0bbb3d3
Merge branch 'appendPutNewDocument' into issue#1743
bourgeoa Dec 27, 2023
d0153fc
Update lib/handlers/put.js
bourgeoa Dec 27, 2023
b348b4b
Update lib/ldp.js
bourgeoa Dec 27, 2023
8018f1f
Update lib/ldp.js
bourgeoa Dec 27, 2023
057157b
Update lib/ldp.js
bourgeoa Dec 27, 2023
a99473d
Update lib/ldp.js
bourgeoa Dec 27, 2023
9e14a1d
failing test in CI
bourgeoa Dec 27, 2023
4900dc7
Merge branch 'issue#1743' of https://github.com/solid/node-solid-serv…
bourgeoa Dec 27, 2023
4860cbb
update solid-crud-tests
bourgeoa Dec 27, 2023
a5d6011
Merge branch 'issue#1743' into 5.7.9-alpha
bourgeoa Dec 27, 2023
b4e062b
update new slug tests
bourgeoa Dec 31, 2023
eca3418
run 18 only
bourgeoa Dec 31, 2023
81f6d10
run 18 only
bourgeoa Dec 31, 2023
1f0277a
Merge branch '5.7.9-alpha' of https://github.com/solid/node-solid-ser…
bourgeoa Dec 31, 2023
a7b7df9
acl-checker.js rewrite parentAcl
bourgeoa Jan 6, 2024
bc592e8
5.7.9-beta
bourgeoa Jan 6, 2024
1593dd2
update DELETE
bourgeoa Jan 7, 2024
667b3a5
update DELETE
bourgeoa Jan 7, 2024
6b6257f
update DELETE
bourgeoa Jan 9, 2024
c91b7bc
cleaning an DELETE
bourgeoa Jan 10, 2024
6c7fe98
cleaning
bourgeoa Jan 10, 2024
95dd7c0
Update README.md
bourgeoa Jan 11, 2024
809e0ac
404 --> 403/401 with DELETE
bourgeoa Jan 15, 2024
33f7354
405 not allowed method
bourgeoa Jan 16, 2024
16e36a6
Update lib/acl-checker.js
bourgeoa Jan 17, 2024
897207c
Update lib/acl-checker.js
bourgeoa Jan 17, 2024
fbd30b0
text/turtle defaultContainerContentType
bourgeoa Jan 17, 2024
5a42a14
Merge branch '5.7.9-beta' of https://github.com/solid/node-solid-serv…
bourgeoa Jan 17, 2024
59f94fb
precondition if-none-match asterisk
bourgeoa Jan 28, 2024
3784e55
redirect http
bourgeoa Jan 28, 2024
9acda7d
cleaning
bourgeoa Jan 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions lib/acl-checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,23 @@ class ACLChecker {

// For delete HTTP method
if ((method === 'DELETE')) {
// deleting a Container
// without Read, the response code will reveal whether a Container is empty or not
if (directory && this.resource.endsWith('/')) resourceAccessDenied([ACL('Read'), ACL('Write')])
// if resource and acl have same parent container,
// then Read Write from parent is required
else if (!directory && aclFile.value.endsWith(`/${this.suffix}`)) await accessdeniedFromParent([ACL('Read'), ACL('Write')]) // directory = rdf.sym(dirname(aclFile.value) + '/')
if (resourceExists) {
// deleting a Container
// without Read, the response code will reveal whether a Container is empty or not
if (directory && this.resource.endsWith('/')) resourceAccessDenied([ACL('Read'), ACL('Write')])
// if resource and acl have same parent container,
// then Read Write from parent is required
bourgeoa marked this conversation as resolved.
Show resolved Hide resolved
else if (!directory && aclFile.value.endsWith(`/${this.suffix}`)) await accessdeniedFromParent([ACL('Read'), ACL('Write')])

// deleting a Document
else if ((directory && directory.value === dirname(aclFile.value) + '/')) {
accessDeniedForAccessTo([ACL('Write')])
} else {
await accessdeniedFromParent([ACL('Write')])
}
// deleting a Document
else if (directory && directory.value === dirname(aclFile.value) + '/') {
accessDeniedForAccessTo([ACL('Write')])
} else {
await accessdeniedFromParent([ACL('Write')])
}

// https://github.com/solid/specification/issues/14#issuecomment-1712773516
} else { accessDenied = true }
}

if (accessDenied && user) {
Expand All @@ -166,7 +170,9 @@ class ACLChecker {
return `${parts.join('/')}/`
}

// Gets the ACL that applies to the resource
// Gets the ACL's that applies to the resource
bourgeoa marked this conversation as resolved.
Show resolved Hide resolved
// DELETE uses docAcl when docAcl is parent to the resource
// or docAcl and parentAcl when docAcl is the ACL of the Resource
async getNearestACL (method) {
const { resource } = this
let isContainer = false
Expand Down
Loading