Skip to content
New issue

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

DownloadImportFailureCsv gives error with more than one guard #12742

Open
leonardyrj opened this issue May 11, 2024 · 2 comments
Open

DownloadImportFailureCsv gives error with more than one guard #12742

leonardyrj opened this issue May 11, 2024 · 2 comments
Labels
enhancement New feature or request low priority
Milestone

Comments

@leonardyrj
Copy link

leonardyrj commented May 11, 2024

Package

filament/actions

Package Version

v3.2.76

Laravel Version

v11.7.0

Livewire Version

v3.4.12

PHP Version

PHP 8.3.0

Problem description

I'm using two panels with different guards.

When I'm importing and it fails, it always tries to find the user in the default guard. There should be an option to choose which guard the user should look for.

It tries to login in to the default guard

Captura de Tela 2024-05-11 às 13 33 21

I think in this part of the code you should choose which guard to use

Expected behavior

When trying to download the file, it should not try to authenticate to a different guard than the one logged in

Steps to reproduce

Upload this file, in the resource car I put the date in an invalid format. And then try to download the failed file.

car-importer-example (1).csv

Reproduction repository

https://github.com/leonardyrj/filament-issue

Relevant log output

No response

@leonardyrj leonardyrj added bug Something isn't working low priority unconfirmed labels May 11, 2024
@danharrin danharrin added this to the v3 milestone May 12, 2024
@danharrin danharrin added enhancement New feature or request low priority and removed bug Something isn't working unconfirmed medium priority labels May 29, 2024
@danharrin
Copy link
Member

I would accept a PR to allow customisation of the guard

@leonardyrj
Copy link
Author

leonardyrj commented May 29, 2024

Eu aceitaria um PR para permitir a personalização da guarda

The problem is in this action middleware, you would have to somehow add additional middleware.

Correct me if I'm wrong. The Action module is to be used independently, so I can't get the guard from the panel.

Would I have to manually add it to the action module?

In my case it would be auth:admin

ActionServiceProvider.php

Captura de Tela 2024-05-29 às 11 41 40

Needs to be customizable

How is the route

Captura de Tela 2024-05-29 às 11 45 47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority
Projects
Status: Todo
Development

No branches or pull requests

2 participants