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

add tests and handling for deleted users #953

Open
wants to merge 5 commits into
base: 12-20-soft_delete_for_user_and_perms
Choose a base branch
from

Conversation

harishv7
Copy link
Contributor

@harishv7 harishv7 commented Dec 20, 2024

Problem

Deleted users were still able to access the system and view sites they previously had access to.

Closes ISOM-1701

Solution

Added checks to prevent deleted users from logging in and viewing sites they previously had access to.

Breaking Changes:

  • No - this PR is backwards compatible

Features:

  • Added user deletion status check during login
  • Filtered out sites where user permissions have been deleted

Improvements:

  • Removed debug console log from user deletion check

Tests

  • Added test for login attempt with deleted user
  • Added test for site listing with deleted permissions
  • Added user service tests for checking deletion status
  • Added helper function for setting up test users with deletion status

New scripts:
None

New dependencies:
None

New dev dependencies:
None

@harishv7 harishv7 changed the title add tests for soft delete add tests and handling for deleted users Dec 20, 2024
Copy link
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@harishv7 harishv7 marked this pull request as ready for review December 20, 2024 15:44
@harishv7 harishv7 requested a review from a team as a code owner December 20, 2024 15:44
@datadog-opengovsg
Copy link

datadog-opengovsg bot commented Dec 20, 2024

Datadog Report

Branch report: 12-20-add_tests_for_soft_delete
Commit report: dba4fc4
Test service: isomer-studio

✅ 0 Failed, 261 Passed, 36 Skipped, 47.03s Total Time
➡️ Test Sessions change in coverage: 1 no change

@harishv7 harishv7 force-pushed the 12-20-add_tests_for_soft_delete branch from 23cf858 to e611093 Compare December 20, 2024 15:51
Copy link

linear bot commented Dec 20, 2024

@harishv7 harishv7 force-pushed the 12-20-soft_delete_for_user_and_perms branch from 6f97b13 to 11d220c Compare January 15, 2025 07:20
@harishv7 harishv7 force-pushed the 12-20-add_tests_for_soft_delete branch from e611093 to 70ea755 Compare January 15, 2025 07:30
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.

2 participants