Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

🐛 BUG: Wasteful frontend course data requirements 🚯 #654

Closed
2 tasks done
torss opened this issue Apr 19, 2018 · 0 comments · Fixed by #664
Closed
2 tasks done

🐛 BUG: Wasteful frontend course data requirements 🚯 #654

torss opened this issue Apr 19, 2018 · 0 comments · Fixed by #664
Assignees
Labels
api All Backend related Issues bug This Issue describes a unwanted behavior web-frontend All frontend related issues

Comments

@torss
Copy link
Collaborator

torss commented Apr 19, 2018

Currently the frontend requires far more information than it should to display the dashboard.
E.g. for teachers, an array of the course's teachers is searched to determine whether or not the course belongs to the current user (see filterMyCourses in dashboard-teacher.component.ts).

This worked in the past because the entire course information was leaked anyway, as noted in #594.
To fix those leaks in #594, without larger frontend changes, an overly complicated filter code was applied.

It would however be more sensible to properly minimize both the required data in the frontend, as well as the sent data in the backend.
The goal is thus to only send data that is actually necessary / intended for display in the frontend, without resorting to complex user-role-specific filtering.

At least changes of both /api/courses/ getCourses and /api/courses/:id getCourse in CourseController.ts are required, with accompanying frontend logic adjustments as needed:

  • Focused /api/courses/ getCourses response & working frontend
  • Focused /api/courses/:id getCourse response & working frontend
@torss torss added bug This Issue describes a unwanted behavior api All Backend related Issues web-frontend All frontend related issues labels Apr 19, 2018
@torss torss self-assigned this Apr 19, 2018
torss added a commit that referenced this issue Apr 23, 2018
PatrickSkowronek added a commit that referenced this issue Apr 26, 2018
torss added a commit that referenced this issue May 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api All Backend related Issues bug This Issue describes a unwanted behavior web-frontend All frontend related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant