Bug #22188
closedChanges made by validated users still need to be validated
Description
I created a user name validator, which is a validated user
When logging as him, changes still need to be validated (tested for application of a diretve to a group, and creation of the global parameter), which defeats the principe of validated user
It prevents automation
Happens on 6.2.20
Files
Updated by Alexis Mousset almost 2 years ago
- Subject changed from Changes made by vaidated users still need to be validated to Changes made by validated users still need to be validated
Updated by Nicolas CHARLES almost 2 years ago
note that group changes are direct with a validated user
Updated by Elaad FURREEDAN almost 2 years ago
- Status changed from New to In progress
- Assignee set to Elaad FURREEDAN
Updated by Elaad FURREEDAN almost 2 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Elaad FURREEDAN to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/rudder-plugins/pull/531
Updated by Elaad FURREEDAN almost 2 years ago
This is a tricky bug, the probleme is in method combine[T](checkFn:(ValidationNeeded, EventActor, T) => Box[Boolean], checks: Seq[ValidationNeeded], actor: EventActor, change: T): Box[WorkflowService]
In this method, we will iterate over checks
who are implementation of ValidationNeeded
that defines their own logic for validation through method forDirective, forGlobalParam etc.
checkFn:(ValidationNeeded, EventActor, T) => Box[Boolean]
is the method that we use to validate, there are for*
method
The problem was when iterates over checks
if a check return true
we don't look at the other check. In the case of validated user, the check was not performed. We should check in priority if there is a validated user before iterating or looking for other checks. If a user is validated, he is no subject to any workflow, so we have to check it before everything.
We decided to remove the logic of validated user from ValidationNeeded
, because it adds complexity to understand, and as for*
methods are identical we decided to check directly validated users in combine
method
Updated by Anonymous almost 2 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder:rudder-plugins|1e58202be82ed7a26ded633a4bcb1d88308a9bee.
Updated by Elaad FURREEDAN over 1 year ago
- Related to Bug #22422: port of ticket 22188 in 7.2 added
Updated by Vincent MEMBRÉ over 1 year ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder plugin change-validation v7.2.5-2.1
Updated by Vincent MEMBRÉ over 1 year ago
This bug has been fixed in Rudder plugin change-validation v7.3.0.rc1-2.1