Searches groups for certain permissions or commands.