• Stan Hu's avatar
    Prevent accidental group deletion if path rename fails · 6405877b
    Stan Hu authored
    If an update to the group path fails validation, the unsaved attributes
    would still be presented because the controller would fall through and
    call `render` on the unsaved group object. There was an attempt to reset
    the path to the previous value, but this did not work because the Rails
    form helper called `Group#to_param`, which loads the full route.
    
    While it may have been intentional to retain the failed values, it's
    better to be safe and reset all the values back to their original state.
    
    Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/241110
    6405877b
groups_controller_spec.rb 37 KB