In sql_load_notes, no longer adding offset clause if start = 0 since SQLite doesn't like offset without limit.
Switched from using "ilike" to "like" with lower(), since "ilike" is a PostgreSQL-specific extension.
Moved BACKEND flags from Database to Persistent to prevent need from circular imports (model files importing controller.Database).
- modify controller.Users.current() to return the user's groups
- update test_current() unit tests to expect empty groups list in results
- modify Main_page, Notebook_rss, Front_page, Tour_page, and Upgrade_page to accept a new groups parameter
- Main_page should add it as a hidden HTML variable
- update Wiki.js to read the hidden groups variable and display the groups in account settings
* controller.Files.upload() now updates user quota storage.
* When a file is uploaded, the new storage bytes count is returned to the client and displayed.
then a new read-write notebook is created for you automatically. This fixes a
bug where you could delete a notebook and have only a read-only notebook
remaining, thereby having no way to add a new notebook.
stupidity proved too complex and fragile. So now they have the full power to
shoot themselves in the foot.
A user can no longer, however, redeem an invite that they send to themself.
* added new database table of invited email addresses
* altered user_notebook table to have a new owner boolean column, indicating whether the user has owner access to the notebook
* altered notebook and note tables/views to have an additional user_id field to indicate the user that created that revision
* updated model.Notebook and model.Note to support new user_id field
* Each model.User now has a current storage bytes and a rate plan.
* model.User.to_dict() updated accordingly.
* Minor Scheduler.add() change to bail of the given thread is None.
* controller.Users.current() returns current user's rate plan details.
* controller.Users.update_storage() now takes an optional callback.
* Various methods in controller.Notebooks responsible for calling controller.Users.update_storage().
* Added rate plan details to config/Common.py.
* Added quota utilization colors to style.css.
* Implemented quota utilization calculation and display in Wiki.js.
Still to-do: Return updated storage bytes where appropriate in controller.Notebook and update the
client accordingly.
* Made sure the trash is not exposed by the read-only notebook view.
* Modified model.User.check_access() to consider read-write access to a
notebook to be sufficient for access to that notebook's trash.
* Modified controller.Users so new users are created with a notebook that
has a trash.
* Changed controller.Notebooks so deleted notes go to the trash (if any).