@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Doctrine\Common\Cache\CacheProvider; |
6 | 6 | use Doctrine\ORM\EntityManager; |
7 | - |
|
8 | 7 | use Oro\Bundle\OrganizationBundle\Entity\BusinessUnit; |
9 | 8 | use Oro\Bundle\SecurityBundle\Owner\Metadata\OwnershipMetadataProvider; |
10 | 9 | use Oro\Bundle\UserBundle\Entity\User; |
@@ -4,12 +4,9 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\HttpFoundation\Request; |
6 | 6 | use Symfony\Component\Security\Core\Exception\AccessDeniedException; |
7 | - |
|
8 | 7 | use Doctrine\Common\Persistence\ManagerRegistry; |
9 | - |
|
10 | 8 | use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\DoctrineParamConverter as BaseParamConverter; |
11 | 9 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationInterface; |
12 | - |
|
13 | 10 | use Oro\Bundle\SecurityBundle\SecurityFacade; |
14 | 11 | |
15 | 12 | /** |
@@ -110,7 +110,7 @@ |
||
110 | 110 | |
111 | 111 | /** |
112 | 112 | * @param Query $query |
113 | - * @param $expr |
|
113 | + * @param \Oro\Bundle\SearchBundle\Query\Criteria\ExpressionBuilder $expr |
|
114 | 114 | */ |
115 | 115 | protected function addOrganizationLimits(Query $query, $expr) |
116 | 116 | { |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Oro\Bundle\SecurityBundle\Search; |
4 | 4 | |
5 | 5 | use Doctrine\Common\Collections\Expr\CompositeExpression; |
6 | - |
|
7 | 6 | use Oro\Bundle\SearchBundle\Provider\SearchMappingProvider; |
8 | 7 | use Oro\Bundle\SearchBundle\Query\Query; |
9 | 8 | use Oro\Bundle\SecurityBundle\EventListener\SearchListener; |
@@ -346,6 +346,9 @@ discard block |
||
346 | 346 | ); |
347 | 347 | } |
348 | 348 | |
349 | + /** |
|
350 | + * @param ObjectIdentity $oid |
|
351 | + */ |
|
349 | 352 | protected function getAcl($oid = null, $entriesInheriting = true) |
350 | 353 | { |
351 | 354 | static $id = 1; |
@@ -385,7 +388,7 @@ discard block |
||
385 | 388 | |
386 | 389 | /** |
387 | 390 | * @param string $permission |
388 | - * @param object $object |
|
391 | + * @param TestEntity $object |
|
389 | 392 | * @return array|null may return null if permission/object combination is not supported |
390 | 393 | */ |
391 | 394 | private function getMasks($permission, $object) |
@@ -395,7 +398,7 @@ discard block |
||
395 | 398 | |
396 | 399 | /** |
397 | 400 | * @param string $permission |
398 | - * @param mixed $object |
|
401 | + * @param TestEntity $object |
|
399 | 402 | * @return MaskBuilder |
400 | 403 | */ |
401 | 404 | private function getMaskBuilder($permission, $object) |
@@ -8,7 +8,6 @@ |
||
8 | 8 | use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity; |
9 | 9 | use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity; |
10 | 10 | use Symfony\Component\Security\Acl\Exception\NoAceFoundException; |
11 | - |
|
12 | 11 | use Oro\Bundle\SecurityBundle\Acl\Domain\ObjectIdAccessor; |
13 | 12 | use Oro\Bundle\SecurityBundle\Acl\Domain\PermissionGrantingStrategy; |
14 | 13 | use Oro\Bundle\SecurityBundle\Acl\Extension\AclExtensionSelector; |
@@ -5,9 +5,7 @@ |
||
5 | 5 | use Symfony\Component\Security\Core\Util\ClassUtils; |
6 | 6 | use Symfony\Component\DependencyInjection\ContainerInterface; |
7 | 7 | use Symfony\Component\Security\Acl\Domain\ObjectIdentity; |
8 | - |
|
9 | 8 | use Oro\Bundle\EntityBundle\ORM\EntityClassResolver; |
10 | - |
|
11 | 9 | use Oro\Bundle\SecurityBundle\Acl\AccessLevel; |
12 | 10 | use Oro\Bundle\SecurityBundle\Acl\Domain\ObjectIdAccessor; |
13 | 11 | use Oro\Bundle\SecurityBundle\Acl\Domain\ObjectIdentityFactory; |
@@ -65,7 +65,7 @@ |
||
65 | 65 | /** |
66 | 66 | * @param bool $isSupports |
67 | 67 | * @param string $group |
68 | - * @return \PHPUnit_Framework_MockObject_MockObject|AclGroupProviderInterface |
|
68 | + * @return AclGroupProviderInterface |
|
69 | 69 | */ |
70 | 70 | protected function getAclGroupProviderMock($isSupports = true, $group = '') |
71 | 71 | { |
@@ -436,6 +436,11 @@ |
||
436 | 436 | ); |
437 | 437 | } |
438 | 438 | |
439 | + /** |
|
440 | + * @param boolean $granting |
|
441 | + * @param integer $mask |
|
442 | + * @param string $strategy |
|
443 | + */ |
|
439 | 444 | private function getAce( |
440 | 445 | $sid, |
441 | 446 | $granting = null, |
@@ -352,6 +352,10 @@ discard block |
||
352 | 352 | $this->assertFalse($p->containsKey('EDIT')); |
353 | 353 | } |
354 | 354 | |
355 | + /** |
|
356 | + * @param string $extensionKey |
|
357 | + * @param ObjectIdentity $rootOid |
|
358 | + */ |
|
355 | 359 | private function initSavePrivileges($extensionKey, $rootOid) |
356 | 360 | { |
357 | 361 | $this->extension->expects($this->any()) |
@@ -364,6 +368,11 @@ discard block |
||
364 | 368 | ->method('adaptRootMask') |
365 | 369 | ->will( |
366 | 370 | $this->returnCallback( |
371 | + |
|
372 | + /** |
|
373 | + * @param string $mask |
|
374 | + * @param ObjectIdentity $object |
|
375 | + */ |
|
367 | 376 | function ($mask, $object) { |
368 | 377 | return $mask; |
369 | 378 | } |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
6 | 6 | use Symfony\Component\DependencyInjection\Reference; |
7 | - |
|
8 | 7 | use Oro\Bundle\SecurityBundle\DependencyInjection\Compiler\OwnershipDecisionMakerPass; |
9 | 8 | |
10 | 9 | class OwnershipDecisionMakerPassTest extends \PHPUnit_Framework_TestCase |