Feature/storage/user quota
Description
This PR adds the storage quota per user feature.
It includes the following:
- a new 'quota' field in the User model so each user has its own quota. It can, therefore, changed per a user basis
- a global default quota variable defined in the settings of the app
- the users' used space and quota is displayed on the resource page
- checks has been added on every data upload (submissions, programs and bundles)
- the front send the the file size among other metadata to the back
- the back checks if it is ok to upload the file based on the remaining user quota
- if not ok an error is sent back to the frontend and is displayed to the user
- using the django admin interface you can update the quota per user
Issues this PR resolves
Part of #713
For testing
To fake the size of a file you can overwrite the line 168 of the src/static/js/ours/client.js file
Checklist
-
Code review by me -
Hand tested by me -
I'm proud of my work -
Code review by reviewer -
Hand tested by reviewer -
CircleCi tests are passing -
Ready to merge