Enable scratch endpoint#839
Draft
zetter-rpf wants to merge 6 commits into
Draft
Conversation
Test coverageSimpleCov coverage data was unavailable for this run. |
00695db to
9fd2598
Compare
This update schools endpoint isn't used, and there were no requests to it the last 30 days. We've chosen to limit the params so we don't get any unexpected behaviour, but can add old ones back in if we want to allow school owners to update them in the future. We've also removed the 422 test as can't seem to make a similar failing test. We've also checked the abilities and only school owners can update the school, but owners, teachers and students can view it.
The behaviour we want is to allow any existing scratch projects to be accessed updated and so I've removed all the checks from the Scratch Controller, except that they are logged in and part of a school. The school check could be removed in the future if we want to open up access to Scratch. Note that some controllers were missing the logged in check so I've updated the code and tests
We're adding a new setting to allow Scratch to be toggled by school owners since Flipper is not designed for gating large amounts of individual actors.
Previously any params could be updated in lessons which was dangerous - we don't expect many of these params to be updated to changing them could create odd behaviour or allow other data to be accessed. I've checked the frontend, and only the name and visibility can be updated. I've done this now so that users can't turn their projects into Scratch projects unexpectedly. We could add attributes back in in the future if we want to.
9fd2598 to
f486e88
Compare
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.
Status
Todo
authorize!callsPoints for consideration:
What's changed?
Description of what's been done - bullets are often best
Steps to perform after deploying to production
If the production environment requires any extra work after this PR has been deployed detail it here. This could be running a Rake task, a migration, or upgrading a Gem. That kind of thing.