mirror of
https://github.com/owncloud/ocis
synced 2026-04-26 01:35:25 +02:00
test: fix resource path when using spaces path with Shares space
Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com> test: remove unwanted changes Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com> test: check resources by sharer Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
This commit is contained in:
@@ -645,19 +645,23 @@ class WebDavHelper {
|
||||
}
|
||||
|
||||
// get space id if testing with spaces dav
|
||||
if ($spaceId === null && $davPathVersionToUse === self::DAV_VERSION_SPACES
|
||||
&& !\in_array($type, ["public-files", "versions"])
|
||||
) {
|
||||
if ($davPathVersionToUse === self::DAV_VERSION_SPACES) {
|
||||
$path = \ltrim($path, "/");
|
||||
$sharesSpace = false;
|
||||
if (\str_starts_with($path, "Shares/")) {
|
||||
$spaceId = GraphHelper::SHARES_SPACE_ID;
|
||||
$sharesSpace = true;
|
||||
$path = "/" . preg_replace("/^Shares\//", "", $path);
|
||||
} else {
|
||||
$spaceId = self::getPersonalSpaceIdForUserOrFakeIfNotFound(
|
||||
$baseUrl,
|
||||
$user,
|
||||
$password,
|
||||
);
|
||||
}
|
||||
if ($spaceId === null && !\in_array($type, ["public-files", "versions"])) {
|
||||
if ($sharesSpace) {
|
||||
$spaceId = GraphHelper::SHARES_SPACE_ID;
|
||||
} else {
|
||||
$spaceId = self::getPersonalSpaceIdForUserOrFakeIfNotFound(
|
||||
$baseUrl,
|
||||
$user,
|
||||
$password,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user