We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I set $defaultEventClickAction, it does not pass policy in onEventClick in HandlesEventClick.php.
$defaultEventClickAction
onEventClick
HandlesEventClick.php
I think that the default action should be loaded before $this->authorize.
$this->authorize
public function onEventClick(array $info = [], ?string $action = null): void { \Log::debug('action: '.$action); try { $model = data_get($info, 'event.extendedProps.model'); $key = data_get($info, 'event.extendedProps.key'); \Log::debug('toto'); if ($model && $key) { $this->resolveEventRecord( data_get($info, 'event.extendedProps.model'), data_get($info, 'event.extendedProps.key'), ); \Log::debug('toto2'); \Log::debug(print_r($action, true)); $this->authorize(match ($action) { 'edit' => 'update', default => $action, }, [$this->eventRecord]); \Log::debug('toto3'); $action ??= data_get($info, 'event.extendedProps.action', $this->getDefaultEventClickAction()); if ($action) { $this->mountAction($action, [ 'event' => data_get($info, 'event', []), ]); } } } catch (AuthorizationException $e) { return; } }
The debug message toto3 is never displayed, while toto2 is shown. Except if I miss something, It's likely that the line:
toto3
toto2
$action ??= data_get($info, 'event.extendedProps.action', $this->getDefaultEventClickAction());
should be put before $this->authorize.
1.7
8.2.0
11.0.0
Linux
No response
The text was updated successfully, but these errors were encountered:
Same issue. Has this been resolved
Sorry, something went wrong.
Not yet. I'll fix it in the next release. If you need it fast, feel free to open a PR and I'll merge it asap.
any news?
Fix default event click authorization
dca1d0a
Fixes GuavaCZ#36
Successfully merging a pull request may close this issue.
What happened?
When I set
$defaultEventClickAction
, it does not pass policy inonEventClick
inHandlesEventClick.php
.I think that the default action should be loaded before
$this->authorize
.How to reproduce the bug
The debug message
toto3
is never displayed, whiletoto2
is shown. Except if I miss something, It's likely that the line:should be put before
$this->authorize
.Package Version
1.7
PHP Version
8.2.0
Laravel Version
11.0.0
Which operating systems does with happen with?
Linux
Notes
No response
The text was updated successfully, but these errors were encountered: