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

HL-849 | Fix insufficient user permissions causing handler application to freeze #2158

Merged
merged 3 commits into from
Aug 11, 2023

Conversation

sirtawast
Copy link
Collaborator

@sirtawast sirtawast commented Jul 31, 2023

Description ✨

Fix issue with wrong user role. If user is logged and has wrong permissions, log the user out.

Testing

  • On local dev: You must set NEXT_PUBLIC_MOCK_FLAG=0 (or modify DB for is_staff=false on currently logged user) and log in as applicant (https://localhost:3000). Then go to https://localhost:3100.
  • On dev/test server: log in as applicant, then go to handler. Loaders spin and nothing gets loaded as all the requests will fail continously.

@sirtawast sirtawast changed the title Hl 849 HL-849 | Fix insufficient user permissions causing handler application to freeze Jul 31, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jul 31, 2023

[yjdh-kesaseteli-shared] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarcloud
Copy link

sonarcloud bot commented Jul 31, 2023

[yjdh-kesaseteli-handler] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 3 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

84.7% 84.7% Coverage
0.0% 0.0% Duplication

@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://kesaseteli-pr2158.api.dev.hel.ninja/healthz 🚀🚀🚀

@sonarcloud
Copy link

sonarcloud bot commented Jul 31, 2023

[yjdh-kesaseteli-employer] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 2 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

82.4% 82.4% Coverage
0.0% 0.0% Duplication

@sonarcloud
Copy link

sonarcloud bot commented Jul 31, 2023

[yjdh-kesaseteli-api] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 60 Code Smells

94.5% 94.5% Coverage
0.0% 0.0% Duplication

@terovirtanen
Copy link
Contributor

YOUTH branch is deployed to platta: https://youth-pr2158.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

HANDLER branch is deployed to platta: https://handler-pr2158.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

EMPLOYER branch is deployed to platta: https://kesaseteli-pr2158.dev.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

Helsinkibenefit-bf-hdlr is deployed to: https://helsinkibenefit-bf-hdlr-2158.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

Helsinkibenefit-bf-appl is deployed to: https://helsinkibenefit-bf-appl-2158.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

Helsinkibenefit-bf-bknd is deployed to: https://helsinkibenefit-bf-bknd-2158.test.kuva.hel.ninja 🚀🚀🚀

@sonarcloud
Copy link

sonarcloud bot commented Jul 31, 2023

[yjdh-kesaseteli-youth] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

91.8% 91.8% Coverage
0.0% 0.0% Duplication

@github-actions
Copy link
Contributor

te-admn is deployed to: https://te-admn-2158.test.kuva.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://handler-pr2158.dev.hel.ninja 😆🎉🎉🎉

@github-actions
Copy link
Contributor

te-yout is deployed to: https://te-yout-2158.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

ks-empl is deployed to: https://ks-empl-2158.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

ks-youth is deployed to: https://ks-youth-2158.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

ks-hdlr is deployed to: https://ks-hdlr-2158.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

te-bknd is deployed to: https://te-bknd-2158.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

ks-bknd is deployed to: https://ks-bknd-2158.test.kuva.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://kesaseteli-pr2158.dev.hel.ninja 😆🎉🎉🎉

@github-actions
Copy link
Contributor

TestCafe result is success for https://helsinkibenefit-bf-appl-2158.test.kuva.hel.ninja! 😆🎉🎉🎉

@github-actions
Copy link
Contributor

TestCafe result is success for https://te-yout-2158.test.kuva.hel.ninja! 😆🎉🎉🎉

@github-actions
Copy link
Contributor

TestCafe result is success for https://te-admn-2158.test.kuva.hel.ninja! 😆🎉🎉🎉

@github-actions
Copy link
Contributor

TestCafe result is success for https://ks-handler-2158.test.kuva.hel.ninja! 😆🎉🎉🎉

@github-actions
Copy link
Contributor

TestCafe result is success for https://ks-empl-2158.test.kuva.hel.ninja! 😆🎉🎉🎉

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://youth-pr2158.dev.hel.ninja 😆🎉🎉🎉

@github-actions
Copy link
Contributor

TestCafe result is success for https://ks-youth-2158.test.kuva.hel.ninja! 😆🎉🎉🎉

@codecov-commenter
Copy link

Codecov Report

Merging #2158 (4a84f92) into develop (7b67120) will decrease coverage by 0.02%.
Report is 11 commits behind head on develop.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           develop    #2158      +/-   ##
===========================================
- Coverage    29.98%   29.97%   -0.02%     
===========================================
  Files          816      816              
  Lines        16786    16793       +7     
  Branches      3650     3652       +2     
===========================================
  Hits          5033     5033              
- Misses       11137    11143       +6     
- Partials       616      617       +1     
Files Changed Coverage Δ
frontend/benefit/handler/src/auth/AuthProvider.tsx 0.00% <0.00%> (ø)
frontend/benefit/handler/src/hooks/useUserQuery.ts 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sirtawast sirtawast merged commit 23bc3b6 into develop Aug 11, 2023
118 checks passed
@sirtawast sirtawast deleted the HL-849 branch August 11, 2023 06: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.

5 participants