Project

General

Profile

Actions

Bug #22188

closed

Changes made by validated users still need to be validated

Bug #22188: Changes made by validated users still need to be validated

Added by Nicolas CHARLES almost 3 years ago. Updated over 2 years ago.

Status:
Released
Priority:
N/A
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

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

clipboard-202212121539-qd0jh.png (51.3 KB) clipboard-202212121539-qd0jh.png Nicolas CHARLES, 2022-12-12 15:39
clipboard-202212121539-qd0jh.png

Related issues 1 (0 open1 closed)

Related to Change validation - Bug #22422: port of ticket 22188 in 7.2ReleasedFrançois ARMANDActions

Updated by Alexis Mousset almost 3 years ago Actions #1

  • 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 3 years ago Actions #2

note that group changes are direct with a validated user

Updated by Elaad FURREEDAN almost 3 years ago Actions #3

  • Status changed from New to In progress
  • Assignee set to Elaad FURREEDAN

Updated by Elaad FURREEDAN almost 3 years ago Actions #4

  • 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 3 years ago Actions #5

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 3 years ago Actions #6

  • Status changed from Pending technical review to Pending release

Updated by Elaad FURREEDAN almost 3 years ago Actions #7

  • Related to Bug #22422: port of ticket 22188 in 7.2 added

Updated by Vincent MEMBRÉ over 2 years ago Actions #8

  • 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 2 years ago Actions #9

This bug has been fixed in Rudder plugin change-validation v7.3.0.rc1-2.1

Actions

Also available in: PDF Atom