fix: sender rules have to apply on user and its aliases - #574
guillaumedc wants to merge 1 commit into
Conversation
68f7086 to
f4d894e
Compare
Test Results170 tests 170 ✅ 24s ⏱️ Results for commit 3e4bf23. ♻️ This comment has been updated with latest results. |
f4d894e to
c448160
Compare
b752928 to
e1110f8
Compare
c448160 to
beb2846
Compare
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
beb2846 to
db1c557
Compare
99cd183 to
b7d464f
Compare
b7d464f to
98eb6be
Compare
marien-probesys
left a comment
There was a problem hiding this comment.
Quelques retours rapides avant de partir en weekend. Aussi y a des changements liés dans #644 (pas grand-chose), donc attention aux conflits
| public function updateAliasGroupsAndPolicyFromUser(User $user): void | ||
| { | ||
| $originalUserGroups = $originalUser->getGroups()->toArray(); | ||
| $parentUser = $user->getOriginalUser(); |
There was a problem hiding this comment.
La PR #567 introduit une méthode User::getMainUser(), ce serait utile de l’utiliser ici.
| $originalUserGroups = $originalUser->getGroups()->toArray(); | ||
| $parentUser = $user->getOriginalUser(); | ||
| if ($parentUser) { | ||
| // If there is a parent, current user is an alias => update using groups and rules from parent |
There was a problem hiding this comment.
J’expliciterai qu’on a passé un alias en paramètre et qu’on update donc que cet utilisateur.
There was a problem hiding this comment.
Je ne suis pas sûr de comprendre la modification attendue.
J'ai fait une proposition.
| $this->updateGroups($user, $parentUser->getGroups()->toArray()); | ||
| $this->updateSenderRules($user, $parentUser->getSenderRules()->toArray()); | ||
| } else { | ||
| // Otherwise it's an original user |
There was a problem hiding this comment.
Et ici qu’on a passé un original user (c’est ce qui est dit) et qu’on synchro donc tous ses alias
| /** | ||
| * @param array<Group> $userGroups | ||
| */ | ||
| private function updateGroups(User $user, array $userGroups): void |
There was a problem hiding this comment.
J’ai pas eu le temps de relire les autres modifs de ce fichier, ni les tests. Bon weekend ;)
98eb6be to
f2983e9
Compare
f2983e9 to
3e4bf23
Compare
Related issue(s)
#554
How to test manually
Reviewer checklist