You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This fixes a problem in editor-standalone where previously a user that
had created a school, but didn't yet have a role in the school, would
be allowed to go through the school onboarding flow a second time.
The method changed in this commit is used by the
`MySchoolController#show` action (exposed at `/api/school`) to return
the school associated with the authenticated user. The `/api/school`
endpoint will now return either the school that the user created, or
that they have a role in. This matches the behaviour of the
`SchoolsController` which uses our Ability class to determine which
school(s) a user can view. Our ability class includes a rule that allows
users to view unverified schools they created[1].
[1]: https://github.com/RaspberryPiFoundation/editor-api/blob/20fbcaddfbe4a320836f3dbd2d274406396c2c57/app/models/ability.rb#L29
0 commit comments