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

Can't purge/purge_all transactions #90

Closed
sebastiaanspeck opened this issue Nov 23, 2022 · 3 comments · Fixed by #92
Closed

Can't purge/purge_all transactions #90

sebastiaanspeck opened this issue Nov 23, 2022 · 3 comments · Fixed by #92
Assignees
Labels
bug Something isn't working

Comments

@sebastiaanspeck
Copy link
Collaborator

When clicking on purge_all on the trash page for transactions, I get a 403 - Not Authorized.

When clicking on a single purge on the trash page for transactions, I get a 404 - Not Found.

When looking into the logic for purge/purge_all, it raised a question. Why do we check when a single purge is done if the record belongs to the user, but when we purge_all, we just delete all without checking if the record belongs to the user.

@sebastiaanspeck sebastiaanspeck added the bug Something isn't working label Nov 23, 2022
@RocketC31
Copy link
Owner

On single we check because we load by the id. So... If we not check we can load and remove the transaction of an other one

But in purge all. We make a eloquent request that take ONLY the transactions in trash for OUR space, so not possible to remove the transactions of others

@RocketC31 RocketC31 self-assigned this Nov 23, 2022
@RocketC31 RocketC31 linked a pull request Nov 23, 2022 that will close this issue
@RocketC31
Copy link
Owner

RocketC31 commented Nov 23, 2022

Hi @sebastiaanspeck i will make a release this evening for that with the fixes we will possibly make today. Because this is not good if we cant remove or restore transactions

@sebastiaanspeck
Copy link
Collaborator Author

On single we check because we load by the id. So... If we not check we can load and remove the transaction of an other one

But in purge all. We make a eloquent request that take ONLY the transactions in trash for OUR space, so not possible to remove the transactions of others

Thanks for the explanation. I couldn't debug that much right now. I was just looking at the code on my phone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants