mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Some more test work
- If test has session when we ask for the share, include session ID in the request cookies
This commit is contained in:
parent
819dc8be7c
commit
501916c13e
@ -540,7 +540,7 @@ class SharingBase extends LoggedInTest
|
|||||||
$this->assertTrue(Vfs::is_readable('/'), 'Could not read root (/) from link');
|
$this->assertTrue(Vfs::is_readable('/'), 'Could not read root (/) from link');
|
||||||
|
|
||||||
// Check other paths
|
// Check other paths
|
||||||
$this->assertFalse(Vfs::is_readable($path), "Was able to read $path as anoymous, it should be mounted as /");
|
$this->assertFalse(Vfs::is_readable($path), "Was able to read $path as anonymous, it should be mounted as /");
|
||||||
$this->assertFalse(Vfs::is_readable($path . '../'));
|
$this->assertFalse(Vfs::is_readable($path . '../'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -557,6 +557,13 @@ class SharingBase extends LoggedInTest
|
|||||||
$curl = curl_init($link);
|
$curl = curl_init($link);
|
||||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
|
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
|
||||||
|
$cookie = '';
|
||||||
|
if($GLOBALS['egw']->session->sessionid || $share['share_with'])
|
||||||
|
{
|
||||||
|
$session_id = $GLOBALS['egw']->session->sessionid ?: $share['share_with'];
|
||||||
|
$cookie .= ';'.Api\Session::EGW_SESSION_NAME."={$session_id}";
|
||||||
|
}
|
||||||
|
curl_setopt($curl, CURLOPT_COOKIE, $cookie);
|
||||||
$html = curl_exec($curl);
|
$html = curl_exec($curl);
|
||||||
curl_close($curl);
|
curl_close($curl);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user