Authorizer: Update homeroom method to be built from student methods#2584
Merged
kevinrobinson merged 11 commits intomasterfrom Sep 4, 2019
Merged
Authorizer: Update homeroom method to be built from student methods#2584kevinrobinson merged 11 commits intomasterfrom
kevinrobinson merged 11 commits intomasterfrom
Conversation
Contributor
Author
|
selfie |
This was referenced Sep 4, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Who is this PR for?
students, families, educators
What problem does this PR fix?
This fixes an authorization gap between the methods answering "what homerooms can an educator access" and "what students can an educator access"? For users with access to the homeroom page, this can result in two problems. This has come up at the start of this school year for this first time.
First, the homeroom dropdown shows homerooms where they wouldn't have access to view full profiles for any students.
Second, if using the dropdown to visit other homeroom pages, those pages would show name and other information about those students, but the student authorization check would prevent access to the profile or to the student photo. This does result in authenticated educators being able to view enrollment information, and other information including disability status.
Student-level authorization rules blocked photos from loading, or from full profiles from being accessed. Monitoring on this is how we came to learn about the problem (there have been no reports from educators).
The core difference in semantics between the previous homeroom-level authorization method and student-level authorization is that the previous homeroom method would include homerooms at the same grade level in the same school as the educator's homeroom, if it was assigned. This would also result in older homerooms (with no students listed) being incorrectly included in the list.
What does this PR do?
EducatortoAuthorizer, rename it as deprecated and require callers to passacknowledge_deprecated:true.grade: 'K'was set on homeroom directly, instead ofKFon student model. Add explicit validation of grade onHomeroommodel as well.PerfTestto test for performances regressions, verify no issues across districts.HomeroomsControllerThis does not cut over the behavior in
HomeroomsController, so nothing should change by shipping this, and I'll do a final check on this before cutting over in a separate PR.Checklists
Which features or pages does this PR touch?
This won't change anything as-is, but when cut over, it will influence:
Does this PR use tests to help verify we can deploy these changes quickly and confidently?