Example #1
0
 public function testConstructor()
 {
     $acl = new Acl(1, $oid = new ObjectIdentity('foo', 'foo'), $permissionStrategy = new PermissionGrantingStrategy(), array(), true);
     $this->assertSame(1, $acl->getId());
     $this->assertSame($oid, $acl->getObjectIdentity());
     $this->assertNull($acl->getParentAcl());
     $this->assertTrue($acl->isEntriesInheriting());
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function getObjectIdentity()
 {
     /**
      *  @todo: Check ObjectIdentity for ACL records from the database.
      *         It is quite possible we will have to return rootAcl ObjectIdentity to
      *         turn additional ACL masks check by AclExtension::adaptRootMask() method.
      */
     if (!count($this->acl->getClassAces()) && !count($this->acl->getObjectAces())) {
         return $this->rootAcl->getObjectIdentity();
     }
     return $this->acl->getObjectIdentity();
 }