Commit f9fc168
committed
fix: address revu-bot review comments on PR #3187
- middleware: treat a missing token.isAdmin as 'old token' and force
re-login so the flag gets populated (otherwise existing users with
a pre-PR JWT would be bounced to /mon-espace for up to 30 days).
- auth/config: memoize the ADMIN_EMAILS set at module load instead of
reparsing the env var on every sign-in.
- admin/page: split the defense-in-depth check to redirect to /login
when there is no session (avoids a redirect chain).1 parent 725c973 commit f9fc168
1 file changed
Lines changed: 9 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
| 158 | + | |
158 | 159 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
167 | 166 | | |
168 | 167 | | |
169 | 168 | | |
| |||
378 | 377 | | |
379 | 378 | | |
380 | 379 | | |
381 | | - | |
382 | | - | |
| 380 | + | |
383 | 381 | | |
384 | 382 | | |
385 | 383 | | |
| |||
0 commit comments