Commit 27b86aa
authored
fix: Removing unnecessary user info returned from the backend (#4138)
### What changes were proposed in this PR?
Currently the endpoint `/api/workflow/owner_user/?wid=X` returns all the
information about the user, including name, email, etc. But the frontend
only needs the name. This PR limits the information returned from the
backend to the user name only.
The main changes are as follow:
1. Change the endpoint name from `/api/workflow/owner_user` to
`/api/workflow/owner_name`
2. Change the SQL query to only return name as plain text.
3. Change related uses of the endpoint in the frontend to match the new
signature.
4. Added a new `WorkflowResourceDashboardUserSpec` to test this endpoint
and support future testing of related endpoints.
### Any related issues, documentation, discussions?
No
### How was this PR tested?
Tests:
<img width="1778" height="429" alt="image"
src="https://github.com/user-attachments/assets/81b91d73-7396-4d97-a53f-80d4ed5ca724"
/>
Manually tested:
<img width="1348" height="658" alt="image"
src="https://github.com/user-attachments/assets/1aeba8b4-343c-407f-b1ef-ffc5b4afee1a"
/>
### Was this PR authored or co-authored using generative AI tooling?
No1 parent acca01d commit 27b86aa
File tree
4 files changed
+33
-24
lines changed- amber/src
- main/scala/org/apache/texera/web/resource/dashboard/user/workflow
- test/scala/org/apache/texera/web/resource/dashboard/file
- frontend/src/app
- common/service/workflow-persist
- hub/component/workflow/detail
4 files changed
+33
-24
lines changedamber/src/main/scala/org/apache/texera/web/resource/dashboard/user/workflow/WorkflowResource.scala
Lines changed: 8 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
715 | | - | |
716 | | - | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
717 | 718 | | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | | - | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
730 | 723 | | |
731 | | - | |
| 724 | + | |
732 | 725 | | |
733 | 726 | | |
734 | 727 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
303 | 320 | | |
304 | 321 | | |
305 | 322 | | |
| |||
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
243 | | - | |
| 241 | + | |
| 242 | + | |
244 | 243 | | |
245 | | - | |
| 244 | + | |
246 | 245 | | |
247 | | - | |
| 246 | + | |
248 | 247 | | |
249 | 248 | | |
250 | 249 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | | - | |
104 | | - | |
| 103 | + | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
0 commit comments