Check for Project Membership for AI access
As part of !124836 (merged) we fixed to check the access for a user when they only have a membership on a sub-group.
However, we have not fixed yet the case when they only have a project membership. Right now we have two methods that check for AI access:
- For chat:
User#any_group_with_ai_available?
- Inverse logic for code suggestions: if a namespace forbids use of code suggestions with
User#code_suggestions_disabled_by_group?
Note: there is also the edge case that they are invited via a group-link, but for due to performance problems with these queries, we focus on project memberships on this issue.
Edited by Nicolas Dular