Skip to content

Enable scratch endpoint#839

Draft
zetter-rpf wants to merge 3 commits into
mainfrom
enable-scratch-endpoint
Draft

Enable scratch endpoint#839
zetter-rpf wants to merge 3 commits into
mainfrom
enable-scratch-endpoint

Conversation

@zetter-rpf
Copy link
Copy Markdown
Contributor

@zetter-rpf zetter-rpf commented May 28, 2026

Status

Todo

  • Update tests to work with missing authorize! calls
  • Add in check when creating projects that scratch is enabled for the school

Points for consideration:

  • Security
  • Performance

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.

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.
@cla-bot cla-bot Bot added the cla-signed label May 28, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 28, 2026

Test coverage

SimpleCov coverage data was unavailable for this run.
Run: https://github.com/RaspberryPiFoundation/editor-api/actions/runs/26760146351

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.
@zetter-rpf zetter-rpf force-pushed the enable-scratch-endpoint branch from 00695db to 9fd2598 Compare June 1, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant