DASSL / ClassDB

An open-source system to let students experiment with relational data
https://dassl.github.io/ClassDB/
Other
8 stars 2 forks source link

Reject row deletion over tables DDLActivity and ConnectionActivity #261

Closed smurthys closed 6 years ago

smurthys commented 6 years ago

The commits in this PR make the following changes:

In future we should also consider preventing direct truncation of these table. For that we need to also implement functions to initiate truncation so the tables can be somehow purged. However, this functionality needs to be discussed as part of a larger log-management feature set.

Fixes #176

afig commented 6 years ago

The changes look great, thanks @smurthys. Tests pass and DELETEs are correctly blocked on ClassDB.DDLActivity on Postgres 9.4 and 10. I only see one minor issue with the comment on L36 of testUserMgmt.sql.

I agree that direct truncation should eventually be blocked as well, and that implementing that should require ClassDB to have additional log management features that allow for similar functionality.

smurthys commented 6 years ago

Thanks @afig for the review. I just corrected the comment.

smurthys commented 6 years ago

I just updated the docs page to say the rows in the log tables cannot be directly manipulated. While there, I also edited that page for correctness, completeness, etc.

smurthys commented 6 years ago

Thanks for the reviews