Commit d7ac8d9
committed
Remove taggings and polymorphic from references
Now that we've moved form references.includes to preload and eager_load,
They are respecting the difference between those 2.
So we can pass polymorphic to preload and it won't blow up.
We can pass taggings to preload and it won't join and bring back too much data.
This commit updates our ar_references methods to filter out polymorphic and taggings from an includes hash.
Also removed virtual attributes since we can't access ruby virtual attributes in sql
(and sql virtual attributes are sub-selects so they shouldn't be in an includes anyway)
We can drop the PolymorphicError issues (handled in rbac filterer and report generator)
We could drop `includes_to_references` support but it is hanging around for legacy purposes and can be dropped soon.1 parent 0d1b816 commit d7ac8d9
File tree
5 files changed
+67
-75
lines changed- app/models/miq_report
- lib
- extensions
- rbac
- spec/lib
- extensions
- rbac
5 files changed
+67
-75
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 91 | | |
103 | | - | |
104 | | - | |
105 | | - | |
| 92 | + | |
106 | 93 | | |
107 | 94 | | |
108 | 95 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 96 | + | |
112 | 97 | | |
113 | 98 | | |
114 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
7 | 5 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
| 329 | + | |
329 | 330 | | |
| 331 | + | |
330 | 332 | | |
331 | 333 | | |
332 | 334 | | |
333 | 335 | | |
| 336 | + | |
334 | 337 | | |
335 | 338 | | |
336 | 339 | | |
| |||
428 | 431 | | |
429 | 432 | | |
430 | 433 | | |
| 434 | + | |
431 | 435 | | |
432 | 436 | | |
433 | 437 | | |
| |||
440 | 444 | | |
441 | 445 | | |
442 | 446 | | |
| 447 | + | |
| 448 | + | |
443 | 449 | | |
444 | 450 | | |
445 | 451 | | |
446 | 452 | | |
447 | 453 | | |
448 | 454 | | |
449 | 455 | | |
| 456 | + | |
450 | 457 | | |
451 | 458 | | |
452 | 459 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
21 | 38 | | |
22 | 39 | | |
23 | 40 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1169 | 1169 | | |
1170 | 1170 | | |
1171 | 1171 | | |
1172 | | - | |
1173 | | - | |
1174 | | - | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
1175 | 1175 | | |
1176 | | - | |
1177 | | - | |
1178 | | - | |
1179 | | - | |
1180 | | - | |
1181 | | - | |
1182 | | - | |
1183 | | - | |
1184 | | - | |
| 1176 | + | |
1185 | 1177 | | |
1186 | 1178 | | |
1187 | | - | |
1188 | | - | |
| 1179 | + | |
1189 | 1180 | | |
1190 | 1181 | | |
1191 | 1182 | | |
1192 | 1183 | | |
1193 | 1184 | | |
1194 | 1185 | | |
| 1186 | + | |
1195 | 1187 | | |
1196 | 1188 | | |
1197 | 1189 | | |
1198 | 1190 | | |
1199 | 1191 | | |
1200 | 1192 | | |
1201 | 1193 | | |
1202 | | - | |
1203 | 1194 | | |
1204 | 1195 | | |
1205 | 1196 | | |
1206 | | - | |
| 1197 | + | |
1207 | 1198 | | |
1208 | 1199 | | |
| 1200 | + | |
1209 | 1201 | | |
1210 | 1202 | | |
1211 | 1203 | | |
1212 | | - | |
| 1204 | + | |
1213 | 1205 | | |
1214 | 1206 | | |
1215 | | - | |
1216 | | - | |
| 1207 | + | |
1217 | 1208 | | |
1218 | 1209 | | |
1219 | 1210 | | |
| |||
2627 | 2618 | | |
2628 | 2619 | | |
2629 | 2620 | | |
| 2621 | + | |
2630 | 2622 | | |
2631 | 2623 | | |
2632 | 2624 | | |
| |||
2769 | 2761 | | |
2770 | 2762 | | |
2771 | 2763 | | |
2772 | | - | |
2773 | | - | |
2774 | | - | |
2775 | | - | |
2776 | | - | |
2777 | | - | |
2778 | | - | |
2779 | | - | |
2780 | | - | |
2781 | | - | |
2782 | | - | |
2783 | | - | |
2784 | | - | |
2785 | 2764 | | |
2786 | 2765 | | |
2787 | 2766 | | |
| |||
0 commit comments