simple-filestore-hooks
is a repo that has a simple filestore authorization
webhook for Hasura that sets up the following authorizations:
- Create: Any logged in user can upload a file
- Delete: Not allowed (except for admin users)
- Read: Any user (including anonymous)
Usage with Hasura
Add this as a git push microservice on Hasura
- Add a
git-push
service via the Hasura console, namedfilestore-check
- Run:
git clone https://github.com/hasura/simple-filestore-hooks.git
cd simple-filestore-hooks
- Get the hasura remote URL from the hasura console:
git remote add hasura <your-hasura-git-remote-url>
- Run:
git push hasura master
Use the authorization hook in the filestore
- On the console head to Filestore > Manage permissions (
/filestore/permissions
) - Add this authorization hook:
http://filestore-check.default/public-read