Rewrite `if:` argument in before_action and alike when `only:` is also used
This is first discovered in https://gitlab.com/gitlab-org/gitlab-ce/issues/54739#note_122609857 that if both
only: are used in a
after_action or alike,
if: is completely ignored.
I hit into the same question at https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8903/diffs#note_126164835 where I am trying to figure out what it means when we pass an array to
if:, and I don't seem to find if it'll mean anything, even looking at the source.
I doubt if it's just ignored and doesn't do anything.
To avoid confusion,
we should remove all arguments which don't do anything. The original code was also pretty ancient and I didn't bother to keep digging the history.
Updated: We decided to rewrite it to better reflect the intention.