RAZ-3125: Speed up folder api calls
- Rewrote to check permissions in query instead of looping over each folder
Merge branch 'develop'

* develop:
  RAZ-3125: Speed up folder api calls - Rewrote to check permissions in query instead of looping over each folder