Skip to content

Conversation

SanderMuller
Copy link

@SanderMuller SanderMuller commented Apr 28, 2025

This PR makes prevents the plugin from throwing exceptions when no user is logged in due to calling ->can() on null as part of the authz checks.

The PR has no impact on merge because the authz checks default to false. To actually render the comments for guests the developer has to override the ->visible() statement on the place of implementation, for example:

CommentsEntry::make('filament_comments')
    ->visible(fn (): bool => auth()->user()?->can('viewAny', config('filament-comments.comment_model')) ?? true),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant