mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 09:19:08 +00:00 
			
		
		
		
	Allowed guest users to access impressum
This commit is contained in:
		| @@ -55,16 +55,16 @@ class SecureSourceLoaderTest extends KernelTestCase | ||||
|         $secureSourceLoader->getSource(); | ||||
|     } | ||||
|  | ||||
| //     public function testGranted(): void | ||||
| //     { | ||||
| //         $requestedSource = new TextSource(); | ||||
| //         $requestedSource->setSlug(SystemSlugType::IMPRINT); | ||||
| //         $requestedRight = new Right(); | ||||
| //         $requestedRight->setSource($requestedSource); | ||||
| //         $requestedRight->setLayer(LayerType::SOURCE); | ||||
| //         $requestedRight->setType(RightType::READ); | ||||
| //         $requestedRight->setReciever($this->sourceRepository->findOneBy(['slug' => SystemSlugType::GUEST_USER])); | ||||
| //         $secureSourceLoader = new SecureSourceLoader($this->sourceRepository, $requestedRight); | ||||
| //         $this->assertInstanceOf(TextSourceInterface::class, $secureSourceLoader->getSource()); | ||||
| //     } | ||||
|     public function testGranted(): void | ||||
|     { | ||||
|         $requestedSource = new TextSource(); | ||||
|         $requestedSource->setSlug(SystemSlugType::IMPRINT); | ||||
|         $requestedRight = new Right(); | ||||
|         $requestedRight->setSource($requestedSource); | ||||
|         $requestedRight->setLayer(LayerType::SOURCE); | ||||
|         $requestedRight->setType(RightType::READ); | ||||
|         $requestedRight->setReciever($this->sourceRepository->findOneBy(['slug' => SystemSlugType::GUEST_USER])); | ||||
|         $secureSourceLoader = new SecureSourceLoader($this->sourceRepository, $requestedRight); | ||||
|         $this->assertInstanceOf(TextSourceInterface::class, $secureSourceLoader->getSource()); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -67,9 +67,6 @@ class RightRepositoryTest extends KernelTestCase | ||||
|         $this->entityManager->persist($this->right); | ||||
|         $this->entityManager->flush(); | ||||
|         $rightId = $this->right->getId(); | ||||
|         /* | ||||
|          * @var RightInterface | ||||
|          */ | ||||
|         $this->loadedRight = $this->rightRepository->find($rightId); | ||||
|         $this->assertEquals($rightId, $this->loadedRight->getId()); | ||||
|         $this->assertEquals(self::PRIORITY, $this->loadedRight->getPriority()); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user