Repository navigation
Sécurise le back-office admin : matrice READ/WRITE par module et IsGranted #2429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Korbeil
wants to merge
10
commits into
afup:master
Choose a base branch
from
Korbeil:afup-ajouter-un-check-isgranted
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1af3680
Sécurise le back-office admin : matrice READ/WRITE par module et IsGr…
Korbeil bdd2092
Relance la CI
BySplashGm d278068
Relance la CI
BySplashGm 1863051
Sécurise le back-office admin : matrice READ/WRITE par module et IsGr…
Korbeil 37403e3
Refonte des Paramètres des personnes physiques : les rôles portent le…
Korbeil 31761ba
Retours de review : réinitialisation des rôles, mot de passe réservé …
Korbeil ff7b274
Retours de review : comptes super admin protégés, matrice réservée au…
Korbeil 49f02dd
Le wipe des droits passe par une commande console à confirmer
Korbeil 90ddf76
Retours de CI : annotations de types PHPStan et virgule finale sur la…
Korbeil f635d7f
Retours de CI : attribut IsGranted manquant sur l'affichage d'une vei…
Korbeil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
43 changes: 43 additions & 0 deletions
43
db/migrations/20261021090000_roles_remplacent_niveau_modules.php
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| use Phinx\Migration\AbstractMigration; | ||
|
|
||
| /** | ||
| * Les droits d'accès au back-office sont désormais portés uniquement par la colonne roles. | ||
| * | ||
| * Cette migration ne fait que le changement de schéma : | ||
| * - roles passe en text (avec les rôles de modules, la liste peut dépasser 255 caractères) ; | ||
| * - les colonnes niveau / niveau_modules sont supprimées. | ||
| * | ||
| * Le wipe des droits (rôles admin / legacy / de modules retirés, seuls ROLE_MEMBER_* | ||
| * et ROLE_COMPANY_MANAGER conservés) est fait via la commande console | ||
| * bin/console security:reset-backoffice-roles, à lancer manuellement. | ||
| */ | ||
| class RolesRemplacentNiveauModules extends AbstractMigration | ||
| { | ||
| public function up(): void | ||
| { | ||
| // Avec les rôles des modules, la liste peut dépasser 255 caractères | ||
| $this->table('afup_personnes_physiques') | ||
| ->changeColumn('roles', 'text', ['null' => false]) | ||
| ->save(); | ||
|
|
||
| $this->table('afup_personnes_physiques') | ||
| ->removeColumn('niveau') | ||
| ->removeColumn('niveau_modules') | ||
| ->save(); | ||
| } | ||
|
|
||
| public function down(): void | ||
| { | ||
| // Les anciens droits ne sont pas récupérables : le retour arrière ne remet que le schéma | ||
| if (!$this->table('afup_personnes_physiques')->hasColumn('niveau')) { | ||
| $this->table('afup_personnes_physiques') | ||
| ->addColumn('niveau', 'integer', ['limit' => 255, 'signed' => false, 'default' => 0, 'after' => 'mot_de_passe']) | ||
| ->addColumn('niveau_modules', 'char', ['limit' => 10, 'default' => '', 'after' => 'niveau']) | ||
| ->save(); | ||
| } | ||
| } | ||
| } |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.