Currently you need to specify the group query and one permission to get results. Change it the way that for each user the full list of permissions is returned. For example:
- By default return all groups that have at least one permission.
- If permission parameter present, return only groups that have that permission.
- If search query q present, return all (having and not having permissions) groups matching the query.
That means removal of selected parameter.
Note the the WS should still work for global and project permissions.