mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 22:17:26 +01:00
Renamed hasSource function
This commit is contained in:
parent
4465f2016d
commit
e221e835d1
@ -33,9 +33,9 @@ final class RightChecker implements RightCheckerInterface
|
|||||||
return $allSourcesToWhichRightApplies;
|
return $allSourcesToWhichRightApplies;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function hasSource(SourceInterface $source): bool
|
private function hasClientSource(SourceInterface $clientSource): bool
|
||||||
{
|
{
|
||||||
return $this->getAllSourcesToWhichRightApplies()->contains($source);
|
return $this->getAllSourcesToWhichRightApplies()->contains($clientSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function isLayerEqual(string $layer): bool
|
private function isLayerEqual(string $layer): bool
|
||||||
@ -60,6 +60,6 @@ final class RightChecker implements RightCheckerInterface
|
|||||||
|
|
||||||
public function isGranted(string $layer, string $type, SourceInterface $source): bool
|
public function isGranted(string $layer, string $type, SourceInterface $source): bool
|
||||||
{
|
{
|
||||||
return $this->isLayerEqual($layer) && $this->isTypeEqual($type) && $this->hasSource($source) && $this->checkPermission();
|
return $this->isLayerEqual($layer) && $this->isTypeEqual($type) && $this->hasClientSource($source) && $this->checkPermission();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user