mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
some tests and fixes for proppatch/profind
This commit is contained in:
parent
0cbcd7bde0
commit
631a0b11d6
@ -1864,7 +1864,7 @@ GROUP BY A.fs_id';
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!Vfs::check_access($path,Api\Acl::EDIT,$stat))
|
if (!Vfs::check_access($path,Api\Acl::EDIT, $stat, $this->user))
|
||||||
{
|
{
|
||||||
return false; // permission denied
|
return false; // permission denied
|
||||||
}
|
}
|
||||||
|
@ -17,11 +17,15 @@ $GLOBALS['egw_info']['user'] = [
|
|||||||
var_dump(Vfs\StreamWrapper::mount());
|
var_dump(Vfs\StreamWrapper::mount());
|
||||||
|
|
||||||
var_dump(file_put_contents('vfs://default/home/ralf/test.txt', "Just a test ;)\n"));
|
var_dump(file_put_contents('vfs://default/home/ralf/test.txt', "Just a test ;)\n"));
|
||||||
|
var_dump("Vfs::proppatch('/home/ralf/test.txt', [['ns' => Vfs::DEFAULT_PROP_NAMESPACE, 'name' => 'test', 'val' => 'something']])=".array2string(Vfs::proppatch('/home/ralf/test.txt', [['ns' => Vfs::DEFAULT_PROP_NAMESPACE, 'name' => 'test', 'val' => 'something']])),
|
||||||
|
"Vfs::propfind('/home/ralf/test.txt')=".json_encode(Vfs::propfind('/home/ralf/test.txt'), JSON_UNESCAPED_SLASHES));
|
||||||
|
|
||||||
var_dump($f=fopen('vfs://default/home/ralf/test.txt', 'r'), fread($f, 100), fclose($f));
|
var_dump($f=fopen('vfs://default/home/ralf/test.txt', 'r'), fread($f, 100), fclose($f));
|
||||||
|
|
||||||
Vfs::$is_root = true;
|
Vfs::$is_root = true;
|
||||||
var_dump(file_put_contents('vfs://default/home/birgit/test.txt', "Just a test ;)\n"));
|
var_dump(file_put_contents('vfs://default/home/birgit/test.txt', "Just a test ;)\n"));
|
||||||
|
var_dump("Vfs::proppatch('/home/birgit/test.txt', [['ns' => Vfs::DEFAULT_PROP_NAMESPACE, 'name' => 'test', 'val' => 'something']])=".array2string(Vfs::proppatch('/home/birgit/test.txt', [['ns' => Vfs::DEFAULT_PROP_NAMESPACE, 'name' => 'test', 'val' => 'something']])),
|
||||||
|
"Vfs::propfind('/home/birgit/test.txt')=".json_encode(Vfs::propfind('/home/birgit/test.txt'), JSON_UNESCAPED_SLASHES));
|
||||||
var_dump(Vfs\StreamWrapper::mount('vfs://birgit@default/home/birgit', '/home/ralf/birgit'));
|
var_dump(Vfs\StreamWrapper::mount('vfs://birgit@default/home/birgit', '/home/ralf/birgit'));
|
||||||
Vfs::$is_root = false;
|
Vfs::$is_root = false;
|
||||||
|
|
||||||
@ -31,6 +35,9 @@ var_dump("Vfs::resolve_url('/home/ralf/birgit/test.txt')=".Vfs::resolve_url('/ho
|
|||||||
var_dump("Vfs::url_stat('/home/ralf/birgit/test.txt')=".json_encode(Vfs::stat('/home/ralf/birgit/test.txt'), JSON_UNESCAPED_SLASHES));
|
var_dump("Vfs::url_stat('/home/ralf/birgit/test.txt')=".json_encode(Vfs::stat('/home/ralf/birgit/test.txt'), JSON_UNESCAPED_SLASHES));
|
||||||
var_dump("Vfs::is_readable('/home/ralf/birgit/test.txt')=".json_encode(Vfs::is_readable('/home/ralf/birgit/test.txt')));
|
var_dump("Vfs::is_readable('/home/ralf/birgit/test.txt')=".json_encode(Vfs::is_readable('/home/ralf/birgit/test.txt')));
|
||||||
var_dump("fopen('vfs://default/home/ralf/birgit/test.txt', 'r')", $f=fopen('vfs://default/home/ralf/birgit/test.txt', 'r'), fread($f, 100), fclose($f));
|
var_dump("fopen('vfs://default/home/ralf/birgit/test.txt', 'r')", $f=fopen('vfs://default/home/ralf/birgit/test.txt', 'r'), fread($f, 100), fclose($f));
|
||||||
|
var_dump("Vfs::propfind('/home/ralf/birgit/test.txt')", Vfs::propfind('/home/ralf/birgit/test.txt'));
|
||||||
|
var_dump("Vfs::proppatch('/home/ralf/birgit/test.txt', [['ns' => Vfs::DEFAULT_PROP_NAMESPACE, 'name' => 'test', 'val' => 'something else']])=".array2string(Vfs::proppatch('/home/ralf/birgit/test.txt', [['ns' => Vfs::DEFAULT_PROP_NAMESPACE, 'name' => 'test', 'val' => 'something else']])),
|
||||||
|
"Vfs::propfind('/home/ralf/birgit/test.txt')=".json_encode(Vfs::propfind('/home/ralf/birgit/test.txt'), JSON_UNESCAPED_SLASHES));
|
||||||
|
|
||||||
var_dump("Vfs::url_stat('/home/ralf/birgit/test.txt')=".json_encode(Vfs::stat('/home/ralf/birgit/test-dir')));
|
var_dump("Vfs::url_stat('/home/ralf/birgit/test.txt')=".json_encode(Vfs::stat('/home/ralf/birgit/test-dir')));
|
||||||
var_dump("Vfs::mkdir('/home/ralf/birgit/test-dir')=".json_encode(Vfs::mkdir('/home/ralf/birgit/test-dir')));
|
var_dump("Vfs::mkdir('/home/ralf/birgit/test-dir')=".json_encode(Vfs::mkdir('/home/ralf/birgit/test-dir')));
|
||||||
|
Loading…
Reference in New Issue
Block a user