Skip to content

SF-3292 Re-pull auth profile if user not in SF#3979

Open
pmachapman wants to merge 1 commit into
masterfrom
fix/SF-3292
Open

SF-3292 Re-pull auth profile if user not in SF#3979
pmachapman wants to merge 1 commit into
masterfrom
fix/SF-3292

Conversation

@pmachapman

@pmachapman pmachapman commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

I have marked this as testing not required, as it must be tested by a developer to recreate the breaking of the auth profile pulling that caused this bug to occur.


This change is Reviewable

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.04%. Comparing base (0be7d55) to head (d091b00).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ientApp/src/xforge-common/user-projects.service.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3979   +/-   ##
=======================================
  Coverage   81.03%   81.04%           
=======================================
  Files         645      645           
  Lines       41463    41468    +5     
  Branches     6750     6734   -16     
=======================================
+ Hits        33600    33607    +7     
- Misses       6755     6766   +11     
+ Partials     1108     1095   -13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

📸 Screenshot diff deployed! (1 change)

View the visual diff at: https://pr-3979--sf-screenshot-diffs.netlify.app

@Nateowami Nateowami left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Nateowami reviewed 10 files and all commit messages, and made 3 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on pmachapman).


src/SIL.XForge.Scripture/ClientApp/src/app/app.component.ts line 317 at r1 (raw file):

    const isLoggedIn = await this.authService.isLoggedIn;
    if (isLoggedIn && this.currentUserDoc.data == null) {
      await this.authService.pullAuthUserProfile();

Seems like if we hit this block, we should await the user doc loading before continuing. Otherwise the rest of the method will continue to operate with a doc that doesn't have its data loaded. Unless I'm misreading something?

I think it could be done with:

await this.currentUserDoc.onlineFetch();

src/SIL.XForge.Scripture/ClientApp/src/assets/i18n/checking_en.json line 383 at r1 (raw file):

    "project_link_is_invalid": "The project link is invalid. Please contact the person who sent you the link and ask for a new one.",
    "role_not_found": "The role you were assigned on this project is no longer available. Please contact the person who sent you the link and ask for a new one.",
    "user_missing": "Your user account could not be found. Please log out join using the link again.",

There's a word missing from this sentence.

Also, is it necessary to show this to a user, or could we just re-call the endpoint?


src/SIL.XForge.Scripture/ClientApp/src/xforge-common/auth.service.ts line 287 at r1 (raw file):

  pullAuthUserProfile(): Promise<void> {
    return this.commandService.onlineInvoke(USERS_URL, 'pullAuthUserProfile');

Good improvement. I was going to say I think this should be added to the users service, but I think we can't do that without creating a circular dependency. (UserService currently depends on AuthService)

@Nateowami Nateowami self-assigned this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants