Skip to content
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

Created separate ePerson pages for create/edit #2391

Conversation

alexandrevryghem
Copy link
Member

@alexandrevryghem alexandrevryghem commented Jul 21, 2023

References

Description

This PR fixes the eperson/epeople administration tab not having a separate url for the create & edit pages. I also fixed other minor bugs related to these pages.

Instructions for Reviewers

List of changes in this PR:

  • Added extra routes to AccessControlRoutingModule for the create & edit pages
  • Removed all the logic to render the EPersonFormComponent on EPeopleRegistryComponent and replaced buttons to redirect to the correct new routes
  • Changed the url to create a new group to make the create page urls a little bit more uniform over the whole application, like the url for the community create page for example: {dspaceObjectType}/create
  • The EPersonDataService.startEditingNewEPerson method returned the wrong url, it returned the EPeople overview page instead of the edit EPerson tab
  • The delete button on the EPersonFormComponent & EPeopleRegistryComponent & GroupFormComponent should be hidden when the user doesn't have enough permissions to delete it instead of just disabling it (this is how the other buttons in the application behave)
  • Fixed small css issue with the spaces between the EPersonFormComponent buttons

Guidance for how to test/review this PR:

  • Navigate between the tabs and check that they use separate urls and that you aren't redirected to the EPeople overview page on refresh
  • Test that creating/editing/deleting an EPerson redirects you to the EPeople overview page when they succeed
  • Test that the delete buttons are now hidden when the user doesn't have the right to delete them, or on the create form or when the group is a permanent group in both the EPeople/Group overview as on the create/edit forms
  • Test that creating/editing/deleting a Group still behaves like before

Checklist

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

- Use the same methods to retrieve the access-control urls
- Fix EPersonDataService.startEditingNewEPerson returning the incorrect link
@github-actions
Copy link

github-actions bot commented Aug 4, 2023

Hi @alexandrevryghem,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

…-administration-page_contribute-maintenance-7.6

# Conflicts:
#	src/app/access-control/epeople-registry/eperson-form/eperson-form.component.html
@alexandrevryghem alexandrevryghem force-pushed the split-eperson-administration-page_contribute-maintenance-7.6 branch from 4877f54 to a419956 Compare October 14, 2023 15:38
Copy link
Contributor

@atarix83 atarix83 left a comment

Choose a reason for hiding this comment

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

thanks @alexandrevryghem for this PR

overall it's working fine, i've just added a tiny minor inline comment and a small improvement to ask.
In order to uniform the eperson/group edit page route to the other dspace object edit page routes, i'd suggest to add /edit at the end of the route.
I mean instead of having

http://localhost:4000/access-control/epeople/a7a17d82-c812-494d-a1a7-43ef88f49eb9

we should have

http://localhost:4000/access-control/epeople/a7a17d82-c812-494d-a1a7-43ef88f49eb9/edit

Copy link
Contributor

@atarix83 atarix83 left a comment

Choose a reason for hiding this comment

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

LGTM thanks @alexandrevryghem

Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

👍 Thanks @alexandrevryghem ! Tested this as well and it works to fix both the linked issues. No new issues found. Code looks good as well.

@tdonohue tdonohue merged commit 97b22c6 into DSpace:dspace-7_x Oct 26, 2023
@tdonohue
Copy link
Member

Ported to main in #2551

@alexandrevryghem alexandrevryghem deleted the split-eperson-administration-page_contribute-maintenance-7.6 branch November 23, 2023 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authorization related to authorization, permissions or groups bug medium priority usability
Projects
Development

Successfully merging this pull request may close these issues.

3 participants