You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The frontend needs to know the device ID that first created a record, to restrict editing of records to the creator device.
Writing this into every record cannot be trusted (clients could write anything), so it's best to derive this from the data.
This issue is to add a field to the index table in sqlite for the creatorCoreId. It should be the core ID of root document for a particular Doc ID (e.g. the document with an empty links: [] field.)
It is possible that a document could have a "forked creator", e.g. more than one document with the same ID that has an empty links field. This could be created by an untrusted client, or a bug in the code which omitted the links field when updating/deleting a document. In the future we can add a creatorForks field or similar to track this, or maybe just a "questionable" boolean field, which could also be set if the createdAt dates change in a document history.
Task
Add a creatorCoreId to the generated SQLite table. We need a value for when it is not determined (e.g. the root document has not been indexed). We can use a null value.
Should check for a pre-existing value in the creatorCoreId field when writing, and if it does exist then check if createdAt matches, and it so overwrite the existing value. This is still not fully deterministic, nor does it establish which is the "correct" creator, but we can resolve that in a follow-up task if a priority.
The text was updated successfully, but these errors were encountered:
Description
The frontend needs to know the device ID that first created a record, to restrict editing of records to the creator device.
Writing this into every record cannot be trusted (clients could write anything), so it's best to derive this from the data.
This issue is to add a field to the index table in sqlite for the
creatorCoreId
. It should be the core ID of root document for a particular Doc ID (e.g. the document with an emptylinks: []
field.)It is possible that a document could have a "forked creator", e.g. more than one document with the same ID that has an empty links field. This could be created by an untrusted client, or a bug in the code which omitted the
links
field when updating/deleting a document. In the future we can add acreatorForks
field or similar to track this, or maybe just a "questionable" boolean field, which could also be set if thecreatedAt
dates change in a document history.Task
Add a
creatorCoreId
to the generated SQLite table. We need a value for when it is not determined (e.g. the root document has not been indexed). We can use anull
value.Should check for a pre-existing value in the
creatorCoreId
field when writing, and if it does exist then check ifcreatedAt
matches, and it so overwrite the existing value. This is still not fully deterministic, nor does it establish which is the "correct" creator, but we can resolve that in a follow-up task if a priority.The text was updated successfully, but these errors were encountered: