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

Refactor initial CSRF creation into an Effect #2891

Closed
tdonohue opened this issue Apr 4, 2024 · 1 comment · Fixed by #2897
Closed

Refactor initial CSRF creation into an Effect #2891

tdonohue opened this issue Apr 4, 2024 · 1 comment · Fixed by #2897
Assignees
Milestone

Comments

@tdonohue
Copy link
Member

tdonohue commented Apr 4, 2024

In #2886, code was added to the request.service.ts which initializes the CSRF token if one does not already exist.

In the below comment, @atarix & @artlowel agreed that this should be refactored into request.effect.ts to avoid a nested subscription:

@artlowel @tdonohue
Looking at the #2886 i'm wondering if the code added here should be refactored in a better way.
I think the better place to do that check is the effect related to the dispatched ngrx action (https://github.com/DSpace/dspace-angular/blob/main/src/app/core/data/request.effects.ts#L43). In this way we avoid to add a nested subscription.
@artlowel do you agree? if so i can do the change in this PR

Originally posted by @atarix83 in #2871 (comment)

@atarix83 I agree that refactor would be a good idea, However I wouldn't hold up this PR to do it. I'd rather do it in a small bugfix PR next week.

Originally posted by @artlowel in #2871 (comment)

@github-project-automation github-project-automation bot moved this to 🆕 Triage in DSpace Backlog Apr 4, 2024
@github-project-automation github-project-automation bot moved this to 📋 To Do in DSpace 8.0 Release Apr 4, 2024
@tdonohue tdonohue moved this from 📋 To Do to 🏗 In Progress in DSpace 8.0 Release Apr 4, 2024
@tdonohue tdonohue removed this from DSpace Backlog Apr 4, 2024
@tdonohue tdonohue added this to the 8.0 milestone Apr 4, 2024
@tdonohue
Copy link
Member Author

tdonohue commented Apr 4, 2024

@atarix83 : Assigning this to you as you volunteered to do this. This refactor can be done in combination with one of the other PRs (Angular 17 upgrade or similar) that are on your plate. Thanks!

@atarix83 atarix83 mentioned this issue Apr 5, 2024
8 tasks
tdonohue added a commit that referenced this issue Apr 10, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In Progress to ✅ Done in DSpace 8.0 Release Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants