Evaluate redirect restriction and param
Moved from #3253 (comment 601159634)
Problem
- In https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/3366, the before action
redirect_to_edit_namespace
was restricted to only apply to thenew
action which was later reverted again. -
edit_namespace
params indicates if the edit namespace form is displayed fornew
action.
Proposal
- We should evaluate whether the restriction to the
new
action is enough or needs to includecreate
as well. - It may be clearer if we split this part into its own action, and thus avoid the use of
edit_namespace
params altogether.
Result
- Only execute a logic where it is really needed by correctly restricting a before action.
- More clearly separated use cases.
Next steps (if any)
How will we measure success?
Edited by Corinna Gogolok