Issue 1247: show error message when user with no bitstream READ access wants to download file#42
Merged
Issue 1247: show error message when user with no bitstream READ access wants to download file#42
Conversation
…s wants to download file
There was a problem hiding this comment.
Pull Request Overview
This PR implements error handling for bitstream access authorization denials by displaying a user-friendly error message when users attempt to download files they don't have READ access to.
Key changes:
- Added authorization denied error handling with proper internationalization support
- Created a new component to display the authorization denial error message
- Integrated the error detection logic into the bitstream download flow
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/assets/i18n/en.json5 | Added English error message for authorization denied scenario |
| src/assets/i18n/cs.json5 | Added Czech translation for authorization denied message |
| src/app/core/shared/clarin/constants.ts | Added constant for authorization denied exception |
| src/app/bitstream-page/clarin-bitstream-download-page/clarin-bitstream-download-page.component.ts | Added logic to detect authorization denied errors |
| src/app/bitstream-page/clarin-bitstream-download-page/clarin-bitstream-download-page.component.html | Added template for displaying authorization denied component |
| src/app/bitstream-page/clarin-bitstream-authorization-denied/clarin-bitstream-authorization-denied.component.ts | New component for displaying authorization denied errors |
| src/app/bitstream-page/clarin-bitstream-authorization-denied/clarin-bitstream-authorization-denied.component.spec.ts | Test file for the new component (placeholder tests) |
| src/app/bitstream-page/clarin-bitstream-authorization-denied/clarin-bitstream-authorization-denied.component.scss | Styling for authorization denied error display |
| src/app/bitstream-page/clarin-bitstream-authorization-denied/clarin-bitstream-authorization-denied.component.html | Template for authorization denied error message |
| src/app/bitstream-page/bitstream-page.module.ts | Module registration for the new component |
...pp/bitstream-page/clarin-bitstream-download-page/clarin-bitstream-download-page.component.ts
Show resolved
Hide resolved
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.
The fix:
In case, user has no READ access for bitstream, the following message is shown in UI on "Download file" click.
Example:
or in Czech: