Fixed permission denied error, when trying to access the log details page of a LabelProfile

This commit is contained in:
Jan Böhmer 2024-02-06 22:09:02 +01:00
parent 47ddcca065
commit e27b15691a

View file

@ -68,7 +68,7 @@ final class LabelProfileVoter extends Voter
protected function supports($attribute, $subject): bool protected function supports($attribute, $subject): bool
{ {
if ($subject instanceof LabelProfile) { if (is_a($subject, LabelProfile::class, true)) {
if (!isset(self::MAPPING[$attribute])) { if (!isset(self::MAPPING[$attribute])) {
return false; return false;
} }
@ -86,6 +86,6 @@ final class LabelProfileVoter extends Voter
public function supportsType(string $subjectType): bool public function supportsType(string $subjectType): bool
{ {
return is_a($subjectType, LabelProfile::class, true); return $subjectType === 'string' || is_a($subjectType, LabelProfile::class, true);
} }
} }