Open marcua opened 10 months ago
I think we should combine forking and querying, if someone can fork the database then they can run read-only queries as well :)
Definitely before we have forking support and support for varying memory/CPU for different databases, I agree. :)
The reason I was thinking someone might want to give fork read-only access but not query read-only access is because queries take up resources on your running database, whereas forking doesn't. So perhaps in the future when you want someone to look at your dataset but don't want them to use up your CPU running queries, you can say "fork my dataset and let me know what you find!" without having to worry about beefing up your own running database.
Definitely not something we have to worry about for a while :).
Working on this next! Came up with a rough outline of a plan in the issue description!
SQLite data models work, and started on Rust data models. For next time
createuser -P postgres_user
(enter password test
), then
sudo -u postgres psql -c "alter user postgres_user createdb;"
createuser -s postgres
, psql -U postgres -c "alter user postgres_user createdb;"
isolation
configuration, but then continues to runpermissions-datamodels
branch, fix whatever the postgres issue is after getting installation workingpermissions-rustdatamodels
permissions-rustdatamodels
!Done
permissions-rustdatamodels
now has the data modelspublic_sharing_level
Next
public_sharing_level
. We already support setting it on creation, so we need an endpoint to update the database.entity_database_permission
Reworked plan to be endpoint-focused (e.g., expose public sharing first) rather than layer-focused (e.g., implementing all DB functionality first, but no endpoints are exposed).
First up: Add endpoint to support updates to a database's public sharing level. Make this a generic update_database endpoint. Permissions: must be manager or owner.
Almost done with endpoint to update public sharing level.
Next
Server-side support for public sharing level updates done. Started writing end-to-end tests.
Next
public_sharing_level
is now updateable! Introduced read-only mode in SQLite!
Next up:
query
endpoint, and 2) updating tests to confirm it worked.List and query logic and tests are all set (exposed to the query and entity details endpoints, passed through properly to rusqlite). Next
(SQLITE_OPEN_CREATE
should only co-exist with SQLITE_OPEN_READ_WRITE)
Merged working support for fork/read-only public sharing level!
Next
Wrote up documentation for both public sharing level and entity-level permissions. Next
Database-/endpoint-/CLI-level support for sharing is implemented (but untested) on branch permissions-crud
. Next
Rough description
A database owner should be able to allow other users/entities to have following levels of access
A database owner should also be able to control whether the public can have various forms of read-only access
The plan
no_access
removes the row if it exists. Permissions: must be manager or owner, managers can't change owner permissions.