Skip to content

Conversation

@carlinmack
Copy link
Contributor

❤️ Thank you for your contribution!

Description

Please describe briefly your pull request.

See inveniosoftware/invenio-rdm-records#2178

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Frontend

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

@carlinmack carlinmack moved this to In progress in Sprint Q4/2025 Oct 13, 2025
@carlinmack carlinmack force-pushed the file-mod-req branch 2 times, most recently from 74fd0db to d084022 Compare October 13, 2025 14:31
@carlinmack carlinmack self-assigned this Oct 13, 2025
@carlinmack carlinmack force-pushed the file-mod-req branch 3 times, most recently from 6399b48 to 31db9d0 Compare October 24, 2025 08:11
@carlinmack carlinmack moved this from In progress to In review 🔍 in Sprint Q4/2025 Oct 27, 2025
@carlinmack carlinmack removed their assignment Oct 27, 2025
@carlinmack
Copy link
Contributor Author

tests pass locally. it's because it needs rdm-records to be merged

rd_allowed = immediate.allowed or request.allowed
existing_request = get_existing_deletion_request(record.id)

if rd_allowed:
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't the feature behind a flag? should we return all this information if f.e. we in CDS do not allow any record deletions?

@carlinmack carlinmack force-pushed the file-mod-req branch 2 times, most recently from 4e69f25 to dc62dd4 Compare November 3, 2025 15:53
* currently the permission is whether you can unlock the files
* but the files are only unlocked when you create the draft
* as such as an admin when you edit a published draft, if it was
  created by a user it will look like the files are unlocked but
  this is false

this PR correctly sets files_locked to whether the files are locked
@carlinmack carlinmack force-pushed the file-mod-req branch 2 times, most recently from e9b21d6 to 217bf3e Compare November 6, 2025 11:01
Copy link
Member

@yashlamba yashlamba left a comment

Choose a reason for hiding this comment

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

Reviewed avec @kpsherva

Comment on lines +142 to +143
"files": record["files"]["count"],
"internalDoi": record["pids"]["doi"]["provider"] != "external",
Copy link
Member

Choose a reason for hiding this comment

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

Question: Could you share why was this required here?

Comment on lines +164 to +170
fm_allowed = file_mod.allowed

file_modification = {
"enabled": file_mod.enabled,
"valid_user": file_mod.valid_user,
"allowed": fm_allowed,
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
fm_allowed = file_mod.allowed
file_modification = {
"enabled": file_mod.enabled,
"valid_user": file_mod.valid_user,
"allowed": fm_allowed,
}
fm_allowed = file_mod.allowed
file_modification = {
"enabled": file_mod.enabled,
"valid_user": file_mod.valid_user,
"allowed": file_mod.allowed,
}

Also, the var names are a bit confusing given we have file_mod, file_modification, and then subkeys. Could it be refactored to something intuitive? (@kpsherva and I would like to understand the naming better for ex: file mod and file_modification, why are they different?)

return null;
}

if (!filesLocked && record.is_published && fileModification.context?.days_until) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: could be extract this logic out to a var?

margin-bottom: 2rem;

.title {
.title:not(.ui) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
.title:not(.ui) {
& > .title {

Suggested in other UI PR

@yashlamba yashlamba moved this from In review 🔍 to In progress in Sprint Q4/2025 Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

4 participants