def __init__(self, request):
        self.request = request
        self.history = []

        # Store stuff about us.
        self.method = request.method
        self.url = urlparse.urlunparse(request.url)
        self.path = request.path

        # Make sure we're the request's response.
        if self.request.response:
            self.history.extend(self.request.response.history)
            self.history.insert(0, self.request.response)
        self.request.response = self

        # Set cookies.
        self.cookies = self.request.session.cookies
Here we check permission types, and see if a user has proper perms.
dataset/ETHPy150Open ecdavis/pants/pants/http/client.py/HTTPResponse.__init__--crossover with--dataset/ETHPy150Open f4nt/djtracker/djtracker/utils.py/check_perms