-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edit item page permission checks #1105
Conversation
Conflicts: src/app/core/data/feature-authorization/feature-id.ts
@Atmire-Kristof : the REST API PR for this is now available, see DSpace/DSpace#3240 Therefore, you may want to test this against the REST API PR to verify it's still working as you planned. I'll also find some additional reviewers/testers in this week's meeting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Atmire-Kristof : Overall this looks good & appears to work well when I test it with the Backend PR (DSpace/DSpace#3240).
However, I found one small bug (see inline comment) where the Withdraw button is now entirely gone.
I've also found that currently I cannot ever access the Bitstreams tab (it's always disabled saying "You're not authorized to access this tab", even when I'm a full Admin). However, it appears (at a glance) like this feature may not be working properly in the Backend PR.
UPDATE: Actually, the Bitstreams tab issue is a small problem in this PR afterall. It looks like you are looking for a feature named canManageBitstreams
, but the feature is instead named canManageBitstreamBundles
(because the Bitstream tab lets you manage All Bundles of Bitstreams). Once that name is corrected, I'm betting the "Bitstreams" tab will work again.
src/app/+item-page/edit-item-page/item-status/item-status.component.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Re-tested with the backend PR (DSpace/DSpace#3240) and the previous issues are now fixed. Thanks @Atmire-Kristof !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @Atmire-Kristof for this PR, I had a look on the code and it seems good to me
remove authorization mocks left over from PR #1105
References
Description
This PR adds more fine-grained permission checks to the edit item page.
Instructions for Reviewers
Changes made:
Mocks:
Since we're waiting on the REST PR to add some of the feature endpoints, I've added mocks for these endpoints on certain items. Rest api containing these items: https://api7.dspace.org/server/#/server/api
canManageBitstreams
is mocked for item 96715576-3748-4761-ad45-001646632963canManageRelationships
is mocked for item 047556d1-3d01-4c53-bc68-0cee7ad7ed4ecanManageVersions
andcanManageMappings
are mocked for item e98b0f27-5c19-49a0-960d-eb6ad5287067How to test:
** 96715576-3748-4761-ad45-001646632963: The bitstreams tab should be available. Relationships, versions and collection mapper should be inaccessible. The collection mapper action on the status page should also be disabled and show a tooltip when hovered over.
** 047556d1-3d01-4c53-bc68-0cee7ad7ed4e: The relationships tab should be available. Bitstreams, versions and collection mapper should be inaccessible. The collection mapper action on the status page should also be disabled and show a tooltip when hovered over.
** e98b0f27-5c19-49a0-960d-eb6ad5287067: The versions and collection mapper tabs should be available. Bitstreams and relationships should be inaccessible. The collection mapper action on the status page should be active and link to the collection mapper tab.
** Visiting any other item's edit page should have all the above actions disabled
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 lint
package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.