- Notifications
You must be signed in to change notification settings - Fork1k
Commit79f06c2
committed
feat: add structured JSON format for APIAllowListTarget
APIAllowListTarget now marshals to/from structured JSON objects`{"type":"workspace","id":"<uuid>"}` instead of colon-delimitedstrings. This improves type safety and frontend ergonomics.Changes:- Modified UnmarshalJSON to parse structured object representation- Extracted setValues helper for shared validation logic- Preserved UnmarshalText for backward compatibility with CLI flags and database helpers- Added MarshalJSON/UnmarshalJSON to x/wildcard/Value for proper JSON handling of wildcard values- Updated frontend mock data to use structured format- Added test coverage for both text and object unmarshaling- Added resource ID matchers to regosql converters for template and workspace ID filtering1 parentb07d6f5 commit79f06c2
File tree
5 files changed
+109
-37
lines changed- coderd
- rbac/regosql
- codersdk
5 files changed
+109
-37
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
93 | 93 |
| |
94 | 94 |
| |
95 | 95 |
| |
96 |
| - | |
97 |
| - | |
98 |
| - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
99 | 100 |
| |
100 | 101 |
| |
101 | 102 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
217 | 217 |
| |
218 | 218 |
| |
219 | 219 |
| |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
220 | 228 |
| |
221 | 229 |
| |
222 | 230 |
| |
| |||
262 | 270 |
| |
263 | 271 |
| |
264 | 272 |
| |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
265 | 281 |
| |
266 | 282 |
| |
267 | 283 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
27 |
| - | |
| 27 | + | |
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
41 |
| - | |
| 41 | + | |
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
14 |
| - | |
15 |
| - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
16 | 17 |
| |
17 | 18 |
| |
18 | 19 |
| |
| |||
30 | 31 |
| |
31 | 32 |
| |
32 | 33 |
| |
33 |
| - | |
| 34 | + | |
34 | 35 |
| |
35 | 36 |
| |
36 | 37 |
| |
37 | 38 |
| |
38 |
| - | |
39 |
| - | |
40 |
| - | |
41 |
| - | |
42 |
| - | |
43 |
| - | |
| 39 | + | |
| 40 | + | |
44 | 41 |
| |
45 |
| - | |
46 |
| - | |
47 |
| - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
48 | 50 |
| |
49 |
| - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
50 | 65 |
| |
51 |
| - | |
| 66 | + | |
52 | 67 |
| |
| 68 | + | |
| 69 | + | |
53 | 70 |
| |
54 |
| - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
55 | 74 |
| |
56 |
| - | |
57 |
| - | |
58 |
| - | |
59 |
| - | |
60 |
| - | |
| 75 | + | |
| 76 | + | |
61 | 77 |
| |
62 |
| - | |
63 | 78 |
| |
64 |
| - | |
65 |
| - | |
66 |
| - | |
67 |
| - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
68 | 84 |
| |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
69 | 95 |
| |
70 |
| - | |
| 96 | + | |
71 | 97 |
| |
72 | 98 |
| |
73 | 99 |
| |
74 |
| - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
75 | 106 |
| |
| 107 | + | |
76 | 108 |
| |
77 | 109 |
| |
78 | 110 |
| |
79 |
| - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
80 | 117 |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
29 |
| - | |
| 29 | + | |
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| |||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
38 |
| - | |
| 38 | + | |
39 | 39 |
| |
40 | 40 |
| |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + |
0 commit comments
Comments
(0)