Conversation
This was referenced Sep 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
Requires backend PR: DSpace/DSpace#13128
Description
The lease access condition (anonymous read policy with no startDate and a future endDate) was silently treated as open.access by the backend. The DefaultAccessStatusHelper.findAvailabilityDate() method called isDateValid(policy) on a lease policy, got true (the policy is currently active), and returned null — which maps to open.access. The lease expiration date was completely lost. When the lease expired, the status flipped directly to restricted/metadata.only with no indication it had ever been a lease.
This PR introduces a new lease access status across the full stack so that items and bitstreams with an active lease display a badge showing the expiration date, and appear as a distinct facet value in search filters.
Instructions for Reviewers
The bug:
A lease is valid today but expires — it is not open access. The fix detects policies with endDate and no startDate as active leases and returns a dedicated "lease" status with the expiration date.
Important
Disclaimer: This PR was developed with the assistance of AI tooling. All changes were reviewed and validated by the author.
Backend changes
Frontend changes
How to test
Checklist