Use target.hidden? once the FF hide_merge_requests_from_banned_users is fully rolled out
Background
In the file ee/lib/elastic/latest/merge_request_instance_proxy.rb
, we can not use data['hidden'] = target.hidden?
because hidden?
method on the target is guarded by a feature flag hide_merge_requests_from_banned_users
. If we use data['hidden'] = target.hidden?
and the feature flag hide_merge_requests_from_banned_users
is disabled it will populate hidden
as false
for all the documents which are wrong. So we are using this data['hidden'] = target.author&.banned?
to overcome this situation.
Proposal
Use data['hidden'] = target.hidden?
once the feature flag hide_merge_requests_from_banned_users
is fully rolled out