Commit a24b49f
committed
fix(webapp): drop the impersonation accent in view-as-user mode, keep capability gates raw
The yellow side-menu border is the loudest tell that you are not the user,
so "view as user" now hides it too — the point of the mode is a dashboard
that looks exactly like the user's. The ways out stay on raw impersonation:
"Stop impersonating" and the toggle itself in the account menu, the
Cmd+Opt+A shortcut, and the routes that clear the impersonation cookie.
The write suppressions (side-menu preferences, favorites) also stay raw —
they keep an admin from writing into the impersonated account and are not
display chrome.
Two more review findings, same area:
- The already-impersonating branch of the impersonation deep link kept only
the pathname, so an admin who was already impersonating and opened a
run link lost the ?span= selection and the follow-up GET built its
destination and post-back paths from an empty search. Keep the search.
- hasAdminDisplayAccess is display-only, but it had reached two gates that
decide what a request may do: the default-region service call and the
query page's EXPLAIN flag. With the toggle on, an admin's own form
submissions were rejected. Both are back on raw
user.admin || user.isImpersonating, and the helper now states the rule:
the toggle changes what is shown, never what is permitted. Every loader
and rendering site stays on the helper.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 9d12b5f commit a24b49f
6 files changed
Lines changed: 27 additions & 11 deletions
File tree
- .server-changes
- apps/webapp/app
- routes
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.query
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.regions
- services
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
| 401 | + | |
401 | 402 | | |
402 | 403 | | |
403 | 404 | | |
| |||
1057 | 1058 | | |
1058 | 1059 | | |
1059 | 1060 | | |
1060 | | - | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
1061 | 1068 | | |
1062 | 1069 | | |
1063 | 1070 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
179 | | - | |
180 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| |||
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
| |||
136 | 135 | | |
137 | 136 | | |
138 | 137 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
143 | 142 | | |
144 | 143 | | |
145 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
163 | 169 | | |
164 | 170 | | |
165 | 171 | | |
| |||
0 commit comments