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:
- Create a group
- In
Group
->Settings
->General
->Permissions, LFS, 2FA
check theEnable delayed project removal
setting and click save. - Create a subgroup
- In
Subgroup
->Settings
->General
->Permissions, LFS, 2FA
theEnable delayed project removal
setting should be enabled. Change an unrelated setting in thePermissions, LFS, 2FA
section and click save. - In
Group
->Settings
->General
->Permissions, LFS, 2FA
uncheck theEnable delayed project removal
setting and click save. - In
Subgroup
->Settings
->General
->Permissions, LFS, 2FA
theEnable 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