Skip to content

Cascading settings - prevent subgroup from unintentionally overriding inherited setting MVC

Follow-up to #321724 (closed) and issue for the discussion in !57878 (comment 545927067)

Currently with the cascading setting framework it is possible to unintentionally override the inherited setting value with these steps:

  1. Create a group
  2. In Group -> Settings -> General -> Permissions, LFS, 2FA check the Enable delayed project removal setting and click save.
  3. Create a subgroup
  4. In Subgroup -> Settings -> General -> Permissions, LFS, 2FA the Enable delayed project removal setting should be enabled. Change an unrelated setting in the Permissions, LFS, 2FA section and click save.
  5. In Group -> Settings -> General -> Permissions, LFS, 2FA uncheck the Enable delayed project removal setting and click save.
  6. In Subgroup -> Settings -> General -> Permissions, LFS, 2FA the Enable delayed project removal settings is still checked when it shouldn't be.

Here is a video to help understand the issue: https://www.loom.com/share/99ec8c1b10df48d3b99b29db0b4edc5d

As an MVC fix we should only save the delayed_project_removal attribute if it is different than the inherited value. This will prevent users from accidentally overriding an inherited setting when saving a unrelated setting.

Edited by Peter Hegman