Conversation
Conflicts: src/app/+item-page/simple/item-page.component.ts src/app/process-page/detail/process-detail.component.spec.ts src/app/process-page/detail/process-detail.component.ts
tdonohue
left a comment
There was a problem hiding this comment.
@Atmire-Kristof : Overall this looks great & it works as described. That said, I noticed a small oddity in the code of operators.ts (see inline comment below) which I'd like to get your feedback & @artlowel 's feedback on. It looks (to me) like we may no longer need the UnauthorizedComponent (at all), as it's only used in one place which seems impossible to trigger. Maybe I'm missing something here though.
In any case, I'm generally +1 on this PR. I'd just like you to look closer at the code to see if we should clean this up further and remove the UnauthorizedComponent.
|
As @tdonohue mentioned, it doesn't make sense for the operator to be able to redirect to a 401 page if not being logged in would redirect you to the login page regardless, so I've removed this check in the operator. |
tdonohue
left a comment
There was a problem hiding this comment.
👍 Code looks good now, and I re-tested and it works as expected. Thanks @Atmire-Kristof !
[DSC-1281] Fix integration test Approved-by: Andrea Barbasso
References
Fixes #923
Description
This PR changes the
redirectOn404Or401(now calledredirectOn4xx) operator to redirect the user to the login page when receiving a 401 and the user isn't logged in. It now also supports a redirect to a 403 page.Instructions for Reviewers
How to test:
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
yarn run lintpackage.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.