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

1842 add expiration date/time to user account #1904

Merged
merged 5 commits into from
Oct 20, 2024

Conversation

roslynwythe
Copy link
Member

@roslynwythe roslynwythe commented Oct 17, 2024

Fixes #1842

What changes did you make?

  • at the server, add new property expiration to the user object
  • at the client, check for expiration in TdmAuthProvider. If the expiration time has passed, the user account object is set to null, in state, UserContext and local Storage
  • updated various components to prevent them from accessing properties of the account object after it has been set to null.

Why did you make the changes (we will use this info to test)?

  • Since the expiration time was not checked periodically, the website did not respond promptly when an account expired, and so the user was permitted to initiate actions (such as editing the FAQ) that could not be completed.
  • The solution in this PR involves only the client and so it is not able to detect situations where the user is logged out from a separate browser tab. A more complete solution would have the client poll the server for user account status or would have the server initiate communication with the client upon change to user account status.

Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)

There were no visual changes to the website

@roslynwythe roslynwythe changed the title 1842 add expiration to account 1842 add expiration date/time to user account Oct 17, 2024
Copy link
Member

@entrotech entrotech left a comment

Choose a reason for hiding this comment

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

I'm just going to approve without extensive testing. Not sure why all the optional chaining operations weren't required before. Maybe other logic prevented that code from executing if the user wasn't logged in. There might have been edge cases where it would have caused a problem.

@entrotech entrotech merged commit 8fc059d into develop Oct 20, 2024
2 checks passed
@entrotech
Copy link
Member

Found a bug in this PR that caused the Admin Notes and Date Admin Modified columns to be hidden (though the column headings were still shown.

image

entrotech added a commit that referenced this pull request Oct 31, 2024
entrotech added a commit that referenced this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Can use "Edit FAQ Page" even with an expired session
2 participants