Skip to content

Commit

Permalink
Use fileId instead of versionId for ctera:guid (CTERA-137).
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkins committed Jan 11, 2024
1 parent 6dd81b6 commit 2a44621
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public CteraAttributesFinderFeature(final DAVSession session) {
protected List<DavResource> list(final Path file) throws IOException {
final List<QName> l = new ArrayList<>();
l.addAll(allCteraCustomACLQn);
// CTERA-137
l.add(SardineUtil.createQNameWithCustomNamespace("guid"));
return session.getClient().list(new DAVPathEncoder().encode(file), 0,
new HashSet<>(l)
Expand All @@ -45,9 +44,8 @@ public PathAttributes toAttributes(final DavResource resource) {
final Acl acl = customPropsToAcl(customProps);
final Permission p = aclToPermission(acl);
final PathAttributes attributes = super.toAttributes(resource);
// CTERA-137
if(customProps != null && customProps.containsKey("guid")) {
attributes.withVersionId(customProps.get("guid"));
attributes.withFileId(customProps.get("guid"));
}
return attributes
.withAcl(acl)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ protected List<DavResource> list(final Path directory) throws IOException {
Stream.of(
// TODO CTERA-136 sent as CteraSession.getFeature(ListService.class) returns DAVListService, but Timestamp feature disabled in CteraSession.getFeature(Timestamp.class) - do we need it?
// DAVTimestampFeature.LAST_MODIFIED_CUSTOM_NAMESPACE, DAVTimestampFeature.LAST_MODIFIED_SERVER_CUSTOM_NAMESPACE
// CTERA-137
SardineUtil.createQNameWithCustomNamespace("guid")
),
allCteraCustomACLQn.stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public <T> T _getFeature(final Class<T> type) {
if(type == Timestamp.class) {
return null;
}
// TODO CTERA-137 enable propfind for testing
// TODO CTERA-137 undo workaround to enable propfind for embeddedWebDAV testing
if(type == Metadata.class && !(embeddedWebDAV || host.getProperty("embeddedWebDAV").equalsIgnoreCase("true"))) {
return null;
}
Expand Down

0 comments on commit 2a44621

Please sign in to comment.