Check that LabGroup exists for the GivenCourse. Previously, it was possible to access labs for groups that did not exist for the GivenCourse in the URL. For example: GET /student/courses/1/lab_groups/3/labs/1, where GivenCourse 1 does not contain LabGroup 3.
Check that LabGroup exists for the GivenCourse.
Previously, it was possible to access labs for groups
that did not exist for the GivenCourse in the URL.
For example: GET /student/courses/1/lab_groups/3/labs/1,
where GivenCourse 1 does not contain LabGroup 3.

This exposes a problem with redundant URL:s.

Since the GivenCourse is not needed to uniquely identify
a particular lab for a particular lab group, it was natural
not to check whether the provided GivenCourse was valid for the LabGroup.
There should however obviously be a check if the given course is to
be included in the url.
This means that we are making a redundant check for reasons of
redudancy.

water/mainline,water/mainline,water/mainline