isomerpages / isomercms-backend

A static website builder and host for the Singapore Government
5 stars 1 forks source link

Feat/is 21 repo privatisation #806

Closed alexanderleegs closed 1 year ago

alexanderleegs commented 1 year ago

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 and deployments table - isPrivate and encryptedPassword, encryptionIv, passwordDate respectively. The new endpoints have been added to the settings router and related services, with the deployment modification logic added to DeploymentsService.

Tests

See frontend for related tests - for private repos, the is_private param for the sites entry should be true and the encrypted_password, encryption_iv and password_date in deployments should contain the appropriate entries

Deploy Notes

Migrations will need to be run on staging/prod before merging this PR.

New environment variables:

alexanderleegs commented 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!