Closed alexanderleegs closed 1 year ago
@alexanderleegs not sure why but there are sadly alot of extra commits Could I get your help to rebase this? [Style] When we are making stacked diffs, shall we we only merge them in when the parent PR is approved? abit hard to reason about a larger pr in one sitting :(
Sorry I thought the base PR was also approved already!
Problem
This PR introduces a repo privatisation feature. To be reviewed in conjunction with PR #1316 on the isomercms-frontend repo.
This PR adds new fields to the
sites
anddeployments
table -isPrivate
andencryptedPassword
,encryptionIv
,passwordDate
respectively. The new endpoints have been added to the settings router and related services, with the deployment modification logic added toDeploymentsService
.Tests
See frontend for related tests - for private repos, the
is_private
param for thesites
entry should betrue
and theencrypted_password
,encryption_iv
andpassword_date
indeployments
should contain the appropriate entriesDeploy Notes
Migrations will need to be run on staging/prod before merging this PR.
New environment variables:
SITE_PASSWORD_SECRET_KEY
: Encryption key for stored passwords, should match the equivalent key on the backendNETLIFY_ACCESS_TOKEN
: this is the access token we use to access our account. We should be using the one generated for isomeradmin