plasmidhq / plasmid

A browser database with optional multi-device syncronization
http://plasmid.readthedocs.org/en/latest/
30 stars 1 forks source link

Quota Enforcement at the Database Level #24

Closed ironfroggy closed 11 years ago

ironfroggy commented 11 years ago

Each database should have an optional Quota enforced.

The database cannot receive updates which would push it over the quota size.

How would this work for granting access to new databases?

ironfroggy commented 11 years ago

If quota are simply set on specific databases, and a user has a wildcard permission to create databases, that doesn't help much.

ironfroggy commented 11 years ago

This limits the amount of space a database can be increased to. But, to be complete, we need to allow a new users to create single database and that database gain the quota by default. How to determine the database name? For randomized access tokens should the database permission be likewise randomized?

Create new credentials, they come with a single CreateDatabase permission on a randomized database name.

Create database, creating credentials auto-granted ReadDatabae and WriteDatabae permissions, DatabaseQuota set on the new database.