I am working on an admin website where users can perform CRUD operations on resources.
When a user with an unprivileged role changes a resource R
, that should not go online immediately, but only after an admin has approved the changes.
So what I did was to create a copy of R
…
Problem is R
has many linked subresources S1 ... SN
.
So when the unprivileged user changes R
and I create a copy R1
I should copy all the subresources as well, which doesn’t feel right.
Any other approach?
I thought about maintaining the original R
in the database and a separate table to keep track of the changes.
The database is Postgresql
Cheers!