Skip to content

Transfer ownership script#662

Merged
zetter-rpf merged 2 commits intomainfrom
transfer-ownership-script
Jan 23, 2026
Merged

Transfer ownership script#662
zetter-rpf merged 2 commits intomainfrom
transfer-ownership-script

Conversation

@zetter-rpf
Copy link
Copy Markdown
Contributor

@zetter-rpf zetter-rpf commented Jan 23, 2026

Related to https://github.com/RaspberryPiFoundation/digital-editor-issues/issues/1095

What's changed?

This is a manual task that we often have to do. Make it easier by creating a re-usable script.

We weren't able to turn off the safeguarding flag for the old user as the API currently requires a user token to do this so have kept it a manual step.

We based this on the documented process here:
https://digital-docs.rpf-internal.org/docs/technology/codebases-and-products/editor/processes/code-editor-for-education/transferring-owners

usage

# To transfer ownership from Jane to John and REMOVE Jane as a teacher:
bundle exec rails school_management:transfer_ownership[jane.doe@example.com,john.doe@example.com]

# To transfer ownership from Jane to John and KEEP Jane as a teacher:
bundle exec rails school_management:transfer_ownership[jane.doe@example.com,john.doe@example.com,true]

Steps after deploy

@cla-bot cla-bot Bot added the cla-signed label Jan 23, 2026
This is a manual task that we often have to do. Make it easier by creating a re-usable script.

We weren't able to turn off the safeguarding flag for the old user as the API currently requires a user token to do this so have kept it a manual step.

We based this on the documented process here:
https://digital-docs.rpf-internal.org/docs/technology/codebases-and-products/editor/processes/code-editor-for-education/transferring-owners

## usage

To transfer ownership from Jane to John and REMOVE Jane as a teacher:
$ bundle exec rails school_management:transfer_ownership[jane.doe@example.com,john.doe@example.com]

To transfer ownership from Jane to John and KEEP Jane as a teacher:
$ bundle exec rails school_management:transfer_ownership[jane.doe@example.com,john.doe@example.com,true]
@zetter-rpf zetter-rpf force-pushed the transfer-ownership-script branch from 261246f to 8ea2ead Compare January 23, 2026 16:44
@zetter-rpf zetter-rpf marked this pull request as ready for review January 23, 2026 16:44
@zetter-rpf zetter-rpf merged commit f6ba44f into main Jan 23, 2026
6 checks passed
@zetter-rpf zetter-rpf deleted the transfer-ownership-script branch January 23, 2026 16:57
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.

2 participants