Bassa
Bassa copied to clipboard
File Management System: Design revamp
Description
Implemented Composite design pattern with two constructs only, namely Folders and Files. The differentiation of projects and workspaces will be handled at the user end rather than the backend, to keep things simple and database management easy.
This allows us to very easily manage ACL flows as we have essentially a single entity to deal with, which is the EntityInterface
abstract class, with Folder and File as its derived classes.
This also helps in writing recursive sql and operations, since we only have to care about a single data structure and hence less costly operations.
Motivation and Context
To simplify and deconstruct the complex architecture previously thought out. Design pattern allows more flexibility and less, concise code
How Has This Been Tested?
Mock tested functions and integration tested APIs using Postman and flask testing
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.
TODO
- [x] Models (files/folders and ACL)
- [x] SQL scripts (new tables and dump values)
- [x] APIs and helper methods (CRUD and move)
- [x] ACL flow (check/grant access with three permission levels, sharing resources)
- [x] File upload
- [x] API tests (storage and acl endpoints)
- [x] User Interface
@agentmilindu @vivonk, please review :)
drive.html
design is WIP
@vivonk any reviews? Here is the wiki: https://github.com/scorelab/Bassa/wiki/File-Management-System Here is the endpoint doc: https://github.com/scorelab/Bassa/wiki/URL-Endpoints#storage-entity-endpoints