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

feat: Add beforeFind triggers for file #8700

Open
wants to merge 3 commits into
base: alpha
Choose a base branch
from

Conversation

dblythy
Copy link
Member

@dblythy dblythy commented Jul 24, 2023

Pull Request

Issue

Currently, there are no find triggers for files.

Closes: #8241
Closes: #6572

Approach

Tasks

  • Add tests

@parse-github-assistant
Copy link

I will reformat the title to use the proper commit message syntax.

@parse-github-assistant parse-github-assistant bot changed the title feat: add beforeFind triggers for file feat: Add beforeFind triggers for file Jul 24, 2023
@parse-github-assistant
Copy link

Thanks for opening this pull request!

@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.48 ⚠️

Comparison is base (6a4a00c) 94.37% compared to head (6ffae73) 93.89%.

❗ Current head 6ffae73 differs from pull request most recent head 0d99225. Consider uploading reports for the commit 0d99225 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##            alpha    #8700      +/-   ##
==========================================
- Coverage   94.37%   93.89%   -0.48%     
==========================================
  Files         185      185              
  Lines       14761    14782      +21     
==========================================
- Hits        13930    13880      -50     
- Misses        831      902      +71     
Impacted Files Coverage Δ
src/Routers/FilesRouter.js 93.98% <100.00%> (+0.69%) ⬆️
src/triggers.js 95.61% <100.00%> (+0.25%) ⬆️

... and 9 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dblythy
Copy link
Member Author

dblythy commented Jul 27, 2023

Unfortunately, as browsers do not pass headers in when using an src tag, request.user won't be passed through. However, support for that feature seems to be extremely complicated and likely breaking.

So, I think this implementation is a good start.

@@ -3531,6 +3531,124 @@ describe('afterLogin hook', () => {
});

describe('saveFile hooks', () => {
Copy link
Member

@mtrezza mtrezza Jul 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these test deliberately under the saveFile hooks or should it be a new describe section?

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.

Restrict file download beforeGetFile trigger
2 participants