Project

General

Profile

Actions

Bug #22188

closed

Changes made by validated users still need to be validated

Added by Nicolas CHARLES almost 2 years ago. Updated over 1 year 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

Related issues 1 (0 open1 closed)

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

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
Actions #2

Updated by Nicolas CHARLES almost 2 years ago

note that group changes are direct with a validated user

Actions #3

Updated by Elaad FURREEDAN almost 2 years ago

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

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
Actions #5

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

Actions #6

Updated by Anonymous almost 2 years ago

  • Status changed from Pending technical review to Pending release
Actions #7

Updated by Elaad FURREEDAN over 1 year ago

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

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

Actions #9

Updated by Vincent MEMBRÉ over 1 year ago

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

Actions

Also available in: Atom PDF