GuavaCZ/filament-knowledge-base

[Bug]: 403 forbidden

Opened this issue · 5 comments

What happened?

Installed according to instructions
Registered plugin in panel provider
Clicked documentation link
image

How to reproduce the bug

Installed according to instructions
Registered plugin in panel provider
Clicked documentation link

Package Version

guava/filament-knowledge-base (1.10.0)

PHP Version

8.2

Laravel Version

11

Which operating systems does with happen with?

macOS

Notes

No response

Hi! Please make sure you enable access to the panel in your canAccessPanel() method in your User model.

I have the same issue: just installed and followed the instructions. The user have access to the panel of course because is already logged in

I have the same issue: just installed and followed the instructions. The user have access to the panel of course because is already logged in

I'm referring to the documentation panel, not your own panel.

@LarryBarker in case you have more than one panel, you have to enable the "knowledge-base" panel:

public function canAccessPanel(Panel $panel): bool
    {
        return match (true) {
            $panel->getId() === 'admin' && $this->role->isAdmin() => true,
-            $panel->getId() === 'app' && $this->role->isUser() => true,
+            $panel->getId() === 'app' || $panel->getId() === 'knowledge-base' && $this->role->isUser() => true,
            default => false,
        };
    }

@lukas-frey consider adding this to the readme?