Allow infinity Depth searches under /dav/pal
This commit is contained in:
@@ -129,19 +129,21 @@ impl PropFindRequestHandler for Server {
|
|||||||
let return_children = match headers.depth {
|
let return_children = match headers.depth {
|
||||||
Depth::One | Depth::None => true,
|
Depth::One | Depth::None => true,
|
||||||
Depth::Zero => false,
|
Depth::Zero => false,
|
||||||
Depth::Infinity => {
|
Depth::Infinity => match resource.collection {
|
||||||
if resource.account_id.is_none()
|
Collection::Principal => true,
|
||||||
|| resource.resource.is_none()
|
Collection::Calendar | Collection::AddressBook
|
||||||
|| matches!(resource.collection, Collection::FileNode)
|
if resource.account_id.is_some() && resource.resource.is_some() =>
|
||||||
{
|
{
|
||||||
|
true
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
return Err(DavErrorCondition::new(
|
return Err(DavErrorCondition::new(
|
||||||
StatusCode::FORBIDDEN,
|
StatusCode::FORBIDDEN,
|
||||||
BaseCondition::PropFindFiniteDepth,
|
BaseCondition::PropFindFiniteDepth,
|
||||||
)
|
)
|
||||||
.into());
|
.into());
|
||||||
}
|
}
|
||||||
true
|
},
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// List shared resources
|
// List shared resources
|
||||||
|
|||||||
Reference in New Issue
Block a user