Jasper Vaneessen
668d0a331f
feat: Only accept NamedNodes as predicates for metadata
...
* refactor: move toCachedNamedNode (private)
* chore: only NamedNodes predicates in removes
* feat: enforce NamedNode predicates in most cases
* feat: getAll only accepts NamedNodes
* feat: toCachedNamedNode only accepts string arg
* tests: use NamedNodes for getAll calls
* test: remove unnecessary string check for coverage
* tests: fix NamedNodes in new tests after rebase
* feat: metadatawriters store NamedNodes
* refactor: toCachedNamedNode as utility function
* fix: double write of linkRelMap
* test: use the CONTENT_TYPE constant
2022-04-15 09:53:39 +02:00
Joachim Van Herwegen
641d39d4bc
Merge branch 'main' into versions/4.0.0
2022-03-29 14:54:59 +02:00
Joachim Van Herwegen
4404fa07d9
refactor: Rename resourceExists to hasResource
...
The function was also moved to the smaller interface ResourceSet.
2022-03-18 14:15:12 +01:00
Joachim Van Herwegen
e4f1e2aa0c
chore(deps): update arrayify-stream to v2
2022-03-10 09:01:53 +01:00
Thomas Dupont
5965268ebf
fix: Prevent slugs with trailing slashes for non-container resources
...
* fix: slugs ending on slash with link header cannot create containers
* refactor(DataAccessorBasedStore): removing duplicate code and errors
* test(ServerFetch): fix integration tests that create a container
* fix: Reinstate original checks in setResource to let tests succeed
* test: change to container paths to end in / on POST only
* refactor: incorporate review changes
* fix: Error check was too strict
Co-authored-by: Joachim Van Herwegen <joachimvh@gmail.com>
* test: make testcase to test allowed slash behaviour
* test: removed unnecessary code from tests
* test: remove metadata line and duplicate tests
Co-authored-by: Joachim Van Herwegen <joachimvh@gmail.com>
2022-02-23 14:35:02 +01:00
Joachim Van Herwegen
d2870e5c8b
fix(deps): Update dependencies
2022-02-11 15:28:50 +01:00
Joachim Van Herwegen
af049124bf
chore: Update eslint dependencies
2022-01-24 09:37:50 +01:00
Joachim Van Herwegen
fb3a59c054
fix: Return 409 when there is a slash semantics issue
2021-10-15 09:15:49 +02:00
Joachim Van Herwegen
5613ff9e71
fix: Let Representations always have a body
...
This is relevant when the request has a content-type
but no data.
2021-10-12 13:30:06 +02:00
Joachim Van Herwegen
b3da9c9fcf
refactor: Restructure source code folder
...
This way the location of certain classes should make more sense
2021-10-12 12:51:02 +02:00
Joachim Van Herwegen
7c7fee5f5c
refactor: Rename associated resource to subject resource
2021-10-08 15:49:49 +02:00
Joachim Van Herwegen
7f8b923399
feat: Replace acl specific permissions with generic permissions
...
This required AuxiliaryStrategy to have a new function
indicating if the auxiliary resource just used its associated resource authorization
or its own.
2021-09-28 13:06:38 +02:00
Joachim Van Herwegen
a1c3633a25
fix: Only check DataAccessor canHandle call for Documents
2021-09-16 13:39:11 +02:00
Joachim Van Herwegen
0271133d33
fix: Hide internal data by making it auxiliary
2021-09-14 10:51:37 +02:00
Joachim Van Herwegen
7f3eab0b20
fix: Prevent parent containers from storing generated metadata
2021-09-08 10:19:28 +02:00
Joachim Van Herwegen
0d42987bbd
feat: Verify conditions in DataAccessorBasedStore
2021-08-18 13:16:08 +02:00
Joachim Van Herwegen
97c534b2bf
feat: Keep track of last modified date of resources
2021-08-18 13:16:08 +02:00
Ruben Verborgh
6495d650c2
chore: Use consistent strategy naming.
2021-07-21 23:37:23 +02:00
Joachim Van Herwegen
12e501844f
fix: Prevent generated metadata from being stored
2021-07-05 14:33:20 +02:00
Joachim Van Herwegen
7cfb87e516
feat: Add better support for non-native errors
2021-06-14 15:29:47 +02:00
Joachim Van Herwegen
e1f95877da
feat: Create ErrorHandler to convert errors to Representations
2021-06-07 13:54:38 +02:00
Joachim Van Herwegen
cae9d54fac
feat: Add getChildren function to DataAccessor interface
...
DataAccessors are now no longer responsible for generating ldp:contains triples.
2021-05-12 15:27:51 +02:00
Arne Vandoorslaer
b3f292d718
feat: Added resourceExists method to ResourceStore
...
* feat: added resourceExists method to ResourceStore
* Merge remote-tracking branch 'origin/main' into feat/add-resourceExists-method-to-ResourceStore
* fix: adapted to review
* fix: adapted to review
2021-02-25 13:43:58 +01:00
Ruben Verborgh
c3cff553e3
feat: Emit container pub event on PUT.
...
Closes https://github.com/solid/community-server/issues/612
2021-02-24 12:04:42 +01:00
Ruben Verborgh
6edc255707
feat: Make stores return modified resources.
2021-02-24 12:04:42 +01:00
Arthur Joppart
28c0eb7e88
Correctly handle slugs in POST requests
...
* bug: correctly handle slug in POST request
* bug: disallow slashes in slug + modified tests
* fix: fixed tests to work with PUT instead of POST+slug
* fix: fixed tests failing in ci
* fix: adapted to reviews
* fix: adapted to review
2021-02-24 12:03:41 +01:00
Joachim Van Herwegen
0c047234e3
feat: Support auxiliary behaviour in DataAccessorBasedStore
2021-02-18 13:26:08 +01:00
Joachim Van Herwegen
6424b07fc6
fix: Prevent setRepresentation crash if there is no root container
2021-02-11 14:35:56 +01:00
Joachim Van Herwegen
c29928c32c
fix: Test error classes correctly
2021-01-29 09:40:10 +01:00
Joachim Van Herwegen
50e3cf5036
fix: Throw correct errors and streamline in DataAccessorBasedStore
2021-01-15 08:42:36 +01:00
Joachim Van Herwegen
fea726ae7d
fix: Take baseIRI into account when calling parseQuads
2021-01-07 14:38:19 +01:00
Joachim Van Herwegen
5995057240
fix: Don't get normalized metadata for root containers
2021-01-07 13:34:05 +01:00
Joachim Van Herwegen
a5bc8d22a9
fix: Prevent POST requests from creating intermediate containers
2021-01-07 08:45:01 +01:00
Ruben Verborgh
ae06e99067
refactor: Also create named nodes for vocabularies.
2021-01-02 23:15:51 +01:00
Ruben Verborgh
8e138c36d1
refactor: Use types to create vocabularies.
2021-01-02 22:56:25 +01:00
Ruben Verborgh
a572825909
refactor: Indicate caching on method name.
2021-01-02 17:50:17 +01:00
Joachim Van Herwegen
39a79dbcb2
fix: Prevent deletion of root storage containers
2020-12-18 11:16:39 +01:00
Joachim Van Herwegen
a721684e6b
fix: Only check relevant type triples
...
Due to the introduction of pim:Storage as a new type
the DataAccessorBasedStore started making wrong assumptions.
2020-12-18 10:55:35 +01:00
Joachim Van Herwegen
a08b7e9112
fix: Allow DataAccessorBasedStore to create root
2020-12-18 10:33:54 +01:00
Joachim Van Herwegen
1bb5de97ab
refactor: Remove base URls with ContainerManager when possible
2020-12-11 12:42:17 +01:00
Joachim Van Herwegen
f0db9e501f
refactor: Replace getParentContainer util function with ContainerManager
2020-12-11 12:42:17 +01:00
Ruben Verborgh
9c933fd2d4
chore: Build to dist folder.
...
Closes https://github.com/solid/community-server/issues/136
2020-12-08 09:30:18 +01:00
Joachim Van Herwegen
d5bf4e1e67
fix: Allow quad data for containers
...
This prevents the container data check from throwing an error when converting to quads
if the incoming data already is quads.
2020-12-07 17:02:50 +01:00
Joachim Van Herwegen
c2b189184b
fix: Create container data before adding content-type
2020-12-02 14:16:45 +01:00
Ruben Verborgh
af8f1976cd
fix: Rename UnsupportedHttpError into BadRequestError.
2020-11-27 14:52:16 +01:00
Joachim Van Herwegen
e4183333fd
fix: Integrate wrapStreamError to prevent uncaught errors
2020-11-24 11:49:10 +01:00
Joachim Van Herwegen
1073c2ff4c
refactor: Clean up utility functions
2020-11-18 17:19:53 +01:00
Ruben Verborgh
0476ba8069
chore(deps): update all dependencies ( #293 )
2020-11-02 09:08:14 +01:00
Joachim Van Herwegen
6ad40763f9
feat: Create DataAccessorBasedStore to have a standard store implementation
2020-10-14 11:32:27 +02:00