feat(server-nestjs): backfill Sécurité project role on existing projects - #2700
Open
shikanime wants to merge 1 commit into
Open
feat(server-nestjs): backfill Sécurité project role on existing projects#2700shikanime wants to merge 1 commit into
shikanime wants to merge 1 commit into
Conversation
The Sécurité role is only seeded for newly created projects (see #2677): projects created before the role existed never get it. Add a migration inserting the missing 'Sécurité' system:managed role (position 4, permissions 832 = SEE_SECRETS | LIST_ENVIRONMENTS | LIST_REPOSITORIES, oidcGroup '/<slug>/console/security') for every project that does not have it yet, mirroring generateProjectCreateInput. The insert is idempotent (anti-join on slug+oidcGroup+position) so existing custom roles at position 4 are left untouched and retries never duplicate. Refs #2676 Signed-off-by: William Phetsinorath <[email protected]> Change-Id: I397eac570291a5959dfdca423da721506a6a6964
shikanime
marked this pull request as ready for review
September 8, 2026 16:10
shikanime
enabled auto-merge
September 8, 2026 16:10
|
StephaneTrebel
approved these changes
Sep 9, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 9, 2026
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.

0 New Issues
0 Fixed Issues
0 Accepted Issues
No data about coverage (24.50% Estimated after merge)
Issues liées
Issues numéro:
#2676
Quel est le comportement actuel ?
Le rôle « Sécurité » n'est créé que pour les nouveaux projets lors de leur création : les projets existants n'en disposent pas.
Quel est le nouveau comportement ?
Ajout d'une migration insérant le rôle « Sécurité » (type
system:managed, position 4, permissions 832 = SEE_SECRETS | LIST_ENVIRONMENTS | LIST_REPOSITORIES, groupe OIDC/<slug>/console/security) pour chaque projet qui ne l'a pas encore, en miroir du seeding TS degenerateProjectCreateInput.L'insertion est idempotente (anti-jointure sur slug + oidcGroup + position) : les rôles personnalisés existants en position 4 sont préservés, aucune ligne dupliquée.
Cette PR introduit-elle un breaking change ?
Non.
Autres informations
Migration validée sur PostgreSQL 16 : backfill d'un projet sans rôles, préservation d'un rôle personnalisé en position 4, absence de doublon quand le rôle existe déjà, ré-exécution sans effet.