fix handling of 'Everyone' acl when using native backend

This commit is contained in:
Robin Appelman 2021-03-05 16:13:37 +01:00
commit b623cc1d7f
3 changed files with 43 additions and 5 deletions

View file

@ -7,6 +7,7 @@
namespace Icewind\SMB\Test;
use Icewind\SMB\ACL;
use Icewind\SMB\BasicAuth;
use Icewind\SMB\Exception\InvalidArgumentException;
use Icewind\SMB\IOptions;
@ -81,4 +82,15 @@ class NativeShareTest extends AbstractShareTest {
);
$server->listShares();
}
public function testACL() {
$this->share->mkdir($this->root . "/test");
$listing = $this->share->dir($this->root);
$this->assertCount(1, $listing);
$acls = $listing[0]->getAcls();
$acl = $acls['Everyone'];
$this->assertEquals($acl->getType(), ACL::TYPE_ALLOW);
$this->assertEquals(ACL::MASK_READ, $acl->getMask() & ACL::MASK_READ);
}
}