frostyx / copr / copr

Forked from copr/copr 7 years ago
Clone

52b449b python: move auth from request init to send

8 files Authored by frostyx 2 years ago, Committed by praiskup 2 years ago,
    python: move auth from request init to send
    
    The previous solution had a drawback that it set the auth not only for
    the current request but also for all the subsequent
    requests. For example:
    
    1. Call `ProjectProxy.get` - the request doesn't require auth and
       therefore is called without it
    2. Call `ProjectProxy.create` - auth is required for creating projects
       and therefore `self.request.auth` is set and used for this request
    3. Call `ProjectProxy.get` again - the `self.request.auth` is set and
       therefore it is used for this request
    
    This may IMHO cause all sorts of hard-to-debug bugs, and therefore I
    am changing this and set the auth for just the current request.
    
    See #2138
    See PR#2102
    Merges: #2149
    
        
file modified
+10 -10
file modified
+9 -11