mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
Fixed permission denied error, when trying to access the log details page of a LabelProfile
This commit is contained in:
parent
47ddcca065
commit
e27b15691a
1 changed files with 2 additions and 2 deletions
|
@ -68,7 +68,7 @@ final class LabelProfileVoter extends Voter
|
|||
|
||||
protected function supports($attribute, $subject): bool
|
||||
{
|
||||
if ($subject instanceof LabelProfile) {
|
||||
if (is_a($subject, LabelProfile::class, true)) {
|
||||
if (!isset(self::MAPPING[$attribute])) {
|
||||
return false;
|
||||
}
|
||||
|
@ -86,6 +86,6 @@ final class LabelProfileVoter extends Voter
|
|||
|
||||
public function supportsType(string $subjectType): bool
|
||||
{
|
||||
return is_a($subjectType, LabelProfile::class, true);
|
||||
return $subjectType === 'string' || is_a($subjectType, LabelProfile::class, true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue