Move `protection_options` to a helper method
The following discussion from !70627 (merged) should be addressed:
-
@mayra-cabrera started a discussion: The name of this method is a bit misleading. I thought it was used for protected branches, but it's in fact used only for default branch protection options.
I think it's also weird that we're invoking a method in
lib/
from the views17:42:35 ❯ grep -nr 'protection_options' app ee app/views/shared/_default_branch_protection.html.haml:3: = f.select :default_branch_protection, options_for_select(Gitlab::Access.protection_options, selected_level), {}, class: 'form-control'
Since it's not used anywhere else, we should probably move it to a helper method.