Prevent isAdminMode from becoming undefined and ensure false is stored correctly#1738
Prevent isAdminMode from becoming undefined and ensure false is stored correctly#1738joshdimanteto wants to merge 4 commits intodevelopfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1738 +/- ##
===========================================
- Coverage 92.98% 92.83% -0.15%
===========================================
Files 13 13
Lines 627 628 +1
Branches 195 193 -2
===========================================
Hits 583 583
- Misses 44 45 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
In the testing instructions you say Admin login retains correct isAdminMode state - If I log out as admin then log back in then it gets reset, so that isnt met. I believe because it deletes it on logout. I checked adding the local storage item and then logging in as a non admin and it did clear it so that way round worked as I would hope.
This should be fixed now, Also this pr need to get merged in before #1717 as it fixes a bug i found |
80cfcc3 to
c8f7122
Compare
c8f7122 to
5d853d0
Compare
Description
This PR fixes an issue where isAdminMode could become undefined after calling setAuthorisation, causing the authorisation listener middleware to attempt storing undefined into local storage.
Key Fixes:
Restores intended behaviour:
Testing instructions
Add a set up instructions describing how the reviewer should test the code