Commit a9759fe
committed
fix(security): ScopesController — add @NoAdminRequired + drop _multitenancy:false
`/api/scopes` is documented as a discovery endpoint any authed user
should be able to call to drive frontend feature gates. But the
docblock only carries `@NoCSRFRequired`, so the framework was
demanding admin membership before the body ran — defeating the point
of self-discovery.
Two compounding issues:
1. Add `@NoAdminRequired` so non-admin callers reach the body. The
body's anonymous + per-caller permission computation already
handles authorization correctly from there.
2. Drop `_multitenancy: false` from the four register/schema lookups.
With it set, discovery returned every register/schema slug across
every tenant — a complete cross-tenant data-shape map for any
tenant user. Only RBAC stays bypassed because the body reduces
the actions per-caller downstream.
Refs: #1419 review (concern 1) — discussion_r31874944531 parent ab3f7f2 commit a9759fe
1 file changed
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
176 | 180 | | |
177 | 181 | | |
178 | | - | |
179 | | - | |
| 182 | + | |
180 | 183 | | |
181 | 184 | | |
182 | 185 | | |
| |||
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
192 | 198 | | |
193 | | - | |
194 | | - | |
| 199 | + | |
195 | 200 | | |
196 | 201 | | |
197 | 202 | | |
| |||
210 | 215 | | |
211 | 216 | | |
212 | 217 | | |
| 218 | + | |
213 | 219 | | |
214 | 220 | | |
215 | | - | |
216 | | - | |
| 221 | + | |
217 | 222 | | |
218 | 223 | | |
219 | 224 | | |
| |||
226 | 231 | | |
227 | 232 | | |
228 | 233 | | |
| 234 | + | |
229 | 235 | | |
230 | | - | |
231 | | - | |
| 236 | + | |
232 | 237 | | |
233 | 238 | | |
234 | 239 | | |
| |||
0 commit comments