Skip to content

feat: return a DeletedResource or DeletedValue instead of 404 if a deleted resource or value is requested (DEV-226) - #1960

Merged
BalduinLandolt merged 35 commits into
mainfrom
wip/DEV-226-show-deleted-resources
Jan 5, 2022
Merged

BalduinLandolt merged 35 commits into
mainfrom
wip/DEV-226-show-deleted-resources

Conversation

@BalduinLandolt

Copy link
Copy Markdown
Contributor

resolves DEV-226

@BalduinLandolt BalduinLandolt changed the title feat: return a DeletedResource instead of 404 if a deleted resource is requested (DEV-226) feat: return a DeletedResource or DeletedValue instead of 404 if a deleted resource or value is requested (DEV-226) Dec 9, 2021
@BalduinLandolt
BalduinLandolt marked this pull request as ready for review December 17, 2021 12:06

@irinaschubert irinaschubert left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just some minor suggesions. I have some questions, I would like to discuss, so I didn't approve yet.

I don't know where to put this so I just write it here: In resources we have creationDate and deleteDate. Shouldn't it be deletionDate to be more consistent? For values, we have valueCreationDate and deleteDate. Shouldn't it be valueDeletionDate?

And, shouldn't we log the user who deleted a resource/value as well? As far as I could see there is only the deletion date and the comment available (but maybe I misunderstood the code). I would do so. As a digital archive we should be able to say who did what.

I couldn't really review the jsonld, ttl, and rdf files as there were too many changes...

Comment thread webapi/src/main/scala/org/knora/webapi/responders/v2/ResourcesResponderV2.scala Outdated
Comment thread webapi/src/main/scala/org/knora/webapi/responders/v2/ResourcesResponderV2.scala Outdated
Comment thread webapi/src/main/scala/org/knora/webapi/responders/v2/ResourcesResponderV2.scala Outdated
propertyIriForGravsearch: SmartIri,
propertyIriInResult: SmartIri,
valueIri: IRI,
customDeleteDate: Option[Instant] = None,

@irinaschubert irinaschubert Dec 20, 2021 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would call it deleteDate instead of customDeleteDate (I see that it wasn't you who named it like that, but still).

Comment thread docs/03-apis/api-v2/editing-resources.md Outdated
Comment thread docs/03-apis/api-v2/editing-resources.md Outdated
Comment thread docs/03-apis/api-v2/editing-resources.md Outdated
Comment thread docs/03-apis/api-v2/editing-resources.md
Comment thread docs/03-apis/api-v2/editing-resources.md Outdated
Comment thread docs/03-apis/api-v2/editing-resources.md Outdated
Comment thread docs/03-apis/api-v2/editing-values.md Outdated
"@value": "http://0.0.0.0:3336/ark:/72163/1/0001/a=thingO/sWSymIzAS_qXqyHLhwbwwAU.20211216T18193124797Z",
"@type": "xsd:anyURI"
},
"knora-api:userHasPermission": "RV",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"knora-api:userHasPermission": "RV",
"knora-api:userPermission": "RV",

"@id": "http://rdfh.ch/users/9XBCrDV3SRa7kS1WwynB4Q"
},
"knora-api:valueHasUUID": "sWSymIzAS_qXqyHLhwbwwA",
"knora-api:hasPermissions": "CR knora-admin:Creator|M knora-admin:ProjectMember|V knora-admin:KnownUser|RV knora-admin:UnknownUser",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"knora-api:hasPermissions": "CR knora-admin:Creator|M knora-admin:ProjectMember|V knora-admin:KnownUser|RV knora-admin:UnknownUser",
"knora-api:permissions": "CR knora-admin:Creator|M knora-admin:ProjectMember|V knora-admin:KnownUser|RV knora-admin:UnknownUser",

or with relevant prefix

@sonarqubecloud

sonarqubecloud Bot commented Jan 3, 2022

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
9.1% 9.1% Duplication

@BalduinLandolt
BalduinLandolt merged commit c78e252 into main Jan 5, 2022
@BalduinLandolt
BalduinLandolt deleted the wip/DEV-226-show-deleted-resources branch January 5, 2022 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants