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

Added "null/admin" accountability and emitEvents opts to FilesService #10268

Merged
merged 1 commit into from Dec 3, 2021
Merged

Added "null/admin" accountability and emitEvents opts to FilesService #10268

merged 1 commit into from Dec 3, 2021

Conversation

keesvanbemmel
Copy link
Contributor

After some discussions on github and Discord with @rijkvanzanten I thought I'd take a swing at fixing/enhancing a few minor things to the FilesService.

  1. It is now possible to pass the emitEvents mutation option to the uploadOne function, so that you can control if events are emitted after a file has been created.
  2. In importOne there was no check if accountability was null. So if the service was being called without accountability it would always throw a ForbiddenException. The other services all act as accountability === admin in that case.

@keesvanbemmel keesvanbemmel changed the title Added "null/admin" accountability and emitEvents opts Added "null/admin" accountability and emitEvents opts to FilesService Dec 3, 2021
@rijkvanzanten
Copy link
Member

Thanks @keesvanbemmel!

Also, congrats on your first official contribution 😄

CleanShot 2021-12-03 at 09 47 33@2x

@rijkvanzanten rijkvanzanten enabled auto-merge (squash) December 3, 2021 14:47
@rijkvanzanten rijkvanzanten merged commit 6617b08 into directus:main Dec 3, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants