rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
454 stars 257 forks source link

User Retention: Improve validation for `disable-inactive-user-after` and `delete-inactive-user-after` fields #11333

Closed rak-phillip closed 2 months ago

rak-phillip commented 3 months ago

Setting an inactivity period to delete user accounts that is less than 336h0m0s returns the error:

admission webhook "rancher.cattle.io.settings.management.cattle.io" denied the request: value: Invalid value: "30h": must be at least 336h0m0s 

Expected Behavior

The user retention form will not validate when known minimum values are not satisfied, alerting an admin that there is an issue with the form before they can submit.

Actual Behavior

The user retention form passes validation, allowing an admin to submit the form with invalid values.

Acceptance Criteria

rak-phillip commented 3 months ago

There might be other fields with well-defined minimum values that we can use for additional form validation. We need to collect more information to find out if we can enhance validation across the board.

rak-phillip commented 2 months ago

Updated the acceptance criteria based on conversation with @pmatseykanets on the topic of validation.

izaac commented 2 months ago

The updates to the E2E test data looks good to me for the purpose of validating the use case.