Improve api performance - refactor hasAccess into query
- Fix Detected cases:
- get channel notifications: current implementation is loading all groups and channels to calc hasAccess. Let’s look into moving the query to sql like the rest, it’s probably just the same as get all channels.
- get channel has the same issue
- get channel members and get groups also need to have the same logic to load only 10 objects into memory
- Investigate more cases using hasAccess and refactor