Commit 8993d67
Add global requireAuth + requireRole middleware for all /admin/* routes
so only users with the admin role can access the admin panel. Previously
any authenticated user could reach the full admin UI.
Also adds a configurable `adminAccessRoles` option to SonicJSConfig for
developers who need to grant admin access to additional roles.
Closes #791
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d9da9f8 commit 8993d67
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
115 | 119 | | |
116 | 120 | | |
117 | 121 | | |
| |||
192 | 196 | | |
193 | 197 | | |
194 | 198 | | |
195 | | - | |
| 199 | + | |
| 200 | + | |
196 | 201 | | |
197 | | - | |
| 202 | + | |
198 | 203 | | |
199 | 204 | | |
200 | 205 | | |
| |||
0 commit comments