ResearchObject / ro-crate

Research Object Crate
https://w3id.org/ro/crate/
Apache License 2.0
88 stars 36 forks source link

Use Case: I want to mark entities within the crate as read-only or edit-only #168

Open marcolarosa opened 3 years ago

marcolarosa commented 3 years ago

As a tools developer I want to be able to write snippets into an ro-crate file and indicate to third party tools that they should treat those snippets in a particular way. For example, if I have a tif image and a tool to create a jpeg image from it, the tool would create two files entries in the crate file (one for each of the tif and jpeg files) and a create action that documents that the jpeg was created from the tif image.

When I load that crate into a tool like describo I want to be able to indicate to describo that each of those entries is read-only or edit-only. If read-only, describo should show the entity but not allow edits of the data or deletion of the entity. If edit-only describo should allow edits to the data but not allow deletion.

Ideally, this would be a simple property on the entity itself:

@graph: [
  {
    @type: File,
    name: whatever.jpg,
    readOnly: true
  }
]

This example would tell describo to show the entity but not allow changes to the data (including changing links to / from it) and to not allow it to be deleted.

or

@graph: [
  {
    @type: File,
    name: whatever.jpg,
    editOnly: true
  }
]

This example would tell describo to show the entity an allow changes to the data (including changing links to / from it) but not allow it to be deleted.

ebremer commented 3 years ago

Perhaps using: https://www.w3.org/wiki/WebAccessControl