From patchwork Thu May 2 10:39:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Senthil Kumaran X-Patchwork-Id: 16577 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 02B3C238EC for ; Thu, 2 May 2013 10:39:27 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id 15sf728269vea.9 for ; Thu, 02 May 2013 03:39:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-beenthere:x-received:received-spf:x-received :x-forwarded-to:x-forwarded-for:delivered-to:x-received:received-spf :mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state:x-original-sender :x-original-authentication-results:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=OMj2KPwO+eKbme+yzZPZF4wGV/PK3GdrvJJz+2wZpmY=; b=koKo5kJCkTDtCgtpSCgsyRqti4LzUcx7FAalvow9cncTLxK2NS5/IJtRtZVyPoWtTd vYSf9uyYFKn2K3CBEduTb0h2Rfo9PUYHhktXuuQqR3ZjqxTdmBh42K766w8Ob/b4LrJ+ A1gNd8zWJFDsW3KJF1GNUuCk/txqOcoRpgeAXbeTlDmUk2LxDNlA4lMBdOtSx6b1ggdd hQtOYYYOv3iCQVP+d5CbJgV9hYhayEZpbb/cfcuyGLUm8tTabfx3u8DltUXs5/sXrPQH /AFZxW+aHioAS2CGnDTrhcvYhYjbpCTkQEVXVF7LajhoN+oqcuYpFHxEQ6bueQSVswoU H2Vw== X-Received: by 10.58.75.169 with SMTP id d9mr5440068vew.14.1367491160612; Thu, 02 May 2013 03:39:20 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.58.5 with SMTP id m5ls1097097qeq.40.gmail; Thu, 02 May 2013 03:39:20 -0700 (PDT) X-Received: by 10.52.29.19 with SMTP id f19mr1646029vdh.100.1367491160355; Thu, 02 May 2013 03:39:20 -0700 (PDT) Received: from mail-ve0-x22b.google.com (mail-ve0-x22b.google.com [2607:f8b0:400c:c01::22b]) by mx.google.com with ESMTPS id s9si2649029vco.39.2013.05.02.03.39.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 May 2013 03:39:20 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22b is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22b; Received: by mail-ve0-f171.google.com with SMTP id oy12so341723veb.2 for ; Thu, 02 May 2013 03:39:20 -0700 (PDT) X-Received: by 10.220.242.73 with SMTP id lh9mr1927564vcb.49.1367491160211; Thu, 02 May 2013 03:39:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp195304veb; Thu, 2 May 2013 03:39:18 -0700 (PDT) X-Received: by 10.180.13.179 with SMTP id i19mr6823534wic.18.1367491157989; Thu, 02 May 2013 03:39:17 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id cd13si7944297wib.55.2013.05.02.03.39.17 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 02 May 2013 03:39:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1UXquz-0006aI-Hz for ; Thu, 02 May 2013 10:39:17 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 61719E05E4 for ; Thu, 2 May 2013 10:39:17 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dashboard X-Launchpad-Branch: ~linaro-validation/lava-dashboard/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 403 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dashboard/trunk] Rev 403: Fix bug #1012604 - Misleading "Bundle does not exist" for private bundles. Message-Id: <20130502103917.18781.98648.launchpad@ackee.canonical.com> Date: Thu, 02 May 2013 10:39:17 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: list X-Generated-By: Launchpad (canonical.com); Revision="16580"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 9b2abfe38aec8ab0b01cb5b8f8bd739211d1f212 X-Gm-Message-State: ALoCoQmrYrmvT291EaXRCCDG2cwQHaXx+PPRb60WhyKjGp+2TrEDffSQWEz7kcwx8kT34leTupfS X-Original-Sender: noreply@launchpad.net X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22b is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , ------------------------------------------------------------ revno: 403 committer: Senthil Kumaran branch nick: trunk timestamp: Thu 2013-05-02 16:00:20 +0530 message: Fix bug #1012604 - Misleading "Bundle does not exist" for private bundles. modified: dashboard_app/xmlrpc.py --- lp:lava-dashboard https://code.launchpad.net/~linaro-validation/lava-dashboard/trunk You are subscribed to branch lp:lava-dashboard. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dashboard/trunk/+edit-subscription === modified file 'dashboard_app/xmlrpc.py' --- dashboard_app/xmlrpc.py 2013-04-04 03:33:50 +0000 +++ dashboard_app/xmlrpc.py 2013-05-02 10:30:20 +0000 @@ -270,12 +270,8 @@ Exceptions raised ----------------- - 404 - Either: - - - Bundle not found - - Downloading from the stream that contains this bundle is - not permitted + - 404 Bundle not found + - 403 Permission denied Rules for bundle stream access ------------------------------ @@ -287,7 +283,9 @@ try: bundle = Bundle.objects.get(content_sha1=content_sha1) if not bundle.bundle_stream.is_accessible_by(self.user): - raise Bundle.DoesNotExist() + raise xmlrpclib.Fault( + 403, "Permission denied. User does not have permissions" + "to access this bundle.") except Bundle.DoesNotExist: raise xmlrpclib.Fault(errors.NOT_FOUND, "Bundle not found")