def _get_permissions(self, request, resources, actions=None):
        assert self.permissions_url, "permission url not available"
        if not isinstance(resources, (list, tuple)):
            resources = (resources,)
        query = [('resource', resource) for resource in resources]
        if actions:
            if not isinstance(actions, (list, tuple)):
                actions = (actions,)
            query.extend((('action', action) for action in actions))
        query = urlencode(query)
        api = request.app.api(request)
        try:
            response = api.get('%s?%s' % (self.permissions_url, query))
        except NotAuthorised:
            handle_401(request)

        return response.json()
dataset/ETHPy150Open quantmind/lux/lux/extensions/rest/backends/browser.py/ApiSessionBackend._get_permissions/original