WebDAV: Fix ACL validation for target folders.
This commit is contained in:
@@ -160,7 +160,7 @@ impl FileCopyMoveRequestHandler for Server {
|
||||
if let Some(document_id) = destination.document_id {
|
||||
if let Some(delete_destination) = &delete_destination
|
||||
&& !access_token.is_member(to_account_id)
|
||||
&& !from_resources.has_access_to_container(
|
||||
&& !to_resources.has_access_to_container(
|
||||
access_token,
|
||||
delete_destination.document_id.unwrap(),
|
||||
Acl::Delete,
|
||||
@@ -170,7 +170,7 @@ impl FileCopyMoveRequestHandler for Server {
|
||||
}
|
||||
|
||||
if !access_token.is_member(to_account_id)
|
||||
&& !from_resources.has_access_to_container(access_token, document_id, Acl::Modify)
|
||||
&& !to_resources.has_access_to_container(access_token, document_id, Acl::Modify)
|
||||
{
|
||||
return Err(DavError::Code(StatusCode::FORBIDDEN));
|
||||
}
|
||||
|
||||
@@ -306,6 +306,13 @@ impl RegistryStore {
|
||||
inner
|
||||
}
|
||||
|
||||
#[cfg(feature = "test_mode")]
|
||||
pub fn clone_with_port(&self, store: u16) -> Self {
|
||||
let mut inner = self.0.as_ref().clone();
|
||||
inner.env_https_port = Some(store);
|
||||
Self(inner.into())
|
||||
}
|
||||
|
||||
#[cfg(feature = "test_mode")]
|
||||
pub async fn new(
|
||||
path: &str,
|
||||
|
||||
Reference in New Issue
Block a user