Remove per-participant ability checks for improved performance
Summary
Following the merge of !213623 (merged) which removed per-note ability checks for participants, we should consider removing the remaining per-participant ability checks for further performance improvements.
Background
As noted by @engwan in the previous MR discussion, there are two types of ability checks in the participants system:
- Per-participant filtering: Filters out participants who don't have access to the current issuable - still active.
- Per-note filtering: Filters out participants from comments that the current user cannot access - removed in previous MR.
The previous MR addressed the more expensive per-note filtering, but the per-participant filtering remains.
Proposal
Remove or modify the filter_by_ability method in the Participable concern for the following reasons:
- Performance: Eliminates the remaining participant filtering overhead
- Redundant security: Email notifications already perform separate ability checks when sending, so unauthorized users won't receive notifications anyway
- Consistency: Aligns with the goal of showing all participants regardless of permission level
Considerations
- This is older, more established behavior that users might expect
- Need to verify that notification security isn't compromised