From patchwork Wed Jul 24 09:50:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Sokolovsky X-Patchwork-Id: 18549 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 454BB25E5F for ; Wed, 24 Jul 2013 09:50:38 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id hf12sf4781361vcb.7 for ; Wed, 24 Jul 2013 02:50:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to :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=JOfixvMvhSFBVjeOdLcUau8ZvcerQ3ZkDt64ZHx1z+8=; b=VGArmIeeaNHHGbgdWxECYOnyVnHnMr6Dtv1JZbh+B8v+MI08UHUfxfWcYiGYYxrnrD 09a/90WkObEvQUWmQ5J1XaPng8moBGeltqqFYVlVKZWMToCUQYF3e5S3yCy1RokO7ndq R5XMNDXx9r9JIAtq1Gp8IAyzVTX//4sLs7jfQdXaF8mxAAah691/lpz1m3xbs6cdFxlP krxykZoFtEK3Uh6t0Z0QLgFm+OwVwvzbS5L10vCfzAknM3pImI9ZLGqgkmukhmJKk/mL dLWN8p9Uh+Fj3XNqkK7WkLtsdIYQ43DCuF0+8Gc/AGSTCA2cQwoIMgEihIGrhHjHTEEp 9dVg== X-Received: by 10.236.54.8 with SMTP id h8mr21037138yhc.11.1374659437328; Wed, 24 Jul 2013 02:50:37 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.25.1 with SMTP id y1ls156642qef.87.gmail; Wed, 24 Jul 2013 02:50:37 -0700 (PDT) X-Received: by 10.52.122.17 with SMTP id lo17mr5595526vdb.5.1374659437204; Wed, 24 Jul 2013 02:50:37 -0700 (PDT) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id st7si9676794vec.49.2013.07.24.02.50.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Jul 2013 02:50:37 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.178; Received: by mail-ve0-f178.google.com with SMTP id pb11so6765961veb.37 for ; Wed, 24 Jul 2013 02:50:37 -0700 (PDT) X-Received: by 10.220.53.7 with SMTP id k7mr13348643vcg.52.1374659437118; Wed, 24 Jul 2013 02:50:37 -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.165.8 with SMTP id yu8csp18830veb; Wed, 24 Jul 2013 02:50:36 -0700 (PDT) X-Received: by 10.180.208.105 with SMTP id md9mr1964981wic.57.1374659435954; Wed, 24 Jul 2013 02:50:35 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id ga9si1607282wic.77.2013.07.24.02.50.35 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 24 Jul 2013 02:50:35 -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 1V1viN-0000Ha-BI for ; Wed, 24 Jul 2013 09:50:35 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 4588BE055B for ; Wed, 24 Jul 2013 09:50:35 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-server X-Launchpad-Branch: ~linaro-validation/lava-server/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 412 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-server/trunk] Rev 412: Cosmetic changes to better support generic OpenID (OPENID_SSO_SERVER_URL unset). Message-Id: <20130724095035.12291.21913.launchpad@ackee.canonical.com> Date: Wed, 24 Jul 2013 09:50:35 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: list X-Generated-By: Launchpad (canonical.com); Revision="16700"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 77e0d2131739b5e4a2399a3f24648efd9d7bf80a X-Gm-Message-State: ALoCoQmQagte4PzjyOtIEqcb66B6hqD0UgspyA22DtvIYMEhqBXfzOdr9FpXwgVNNSog5US7I7Dd X-Original-Sender: noreply@launchpad.net X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.178 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: 412 committer: Paul Sokolovsky branch nick: lava-server.openid-generic timestamp: Tue 2013-07-23 16:29:45 +0300 message: Cosmetic changes to better support generic OpenID (OPENID_SSO_SERVER_URL unset). If OPENID_SSO_SERVER_URL is unset or non-Launchpad OpenID server is used, just use generic OpenID wording. modified: lava_server/context_processors.py lava_server/templates/registration/login.html --- lp:lava-server https://code.launchpad.net/~linaro-validation/lava-server/trunk You are subscribed to branch lp:lava-server. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-server/trunk/+edit-subscription === modified file 'lava_server/context_processors.py' --- lava_server/context_processors.py 2012-05-11 20:11:09 +0000 +++ lava_server/context_processors.py 2013-07-23 13:29:45 +0000 @@ -21,6 +21,7 @@ import lava_server from lava_server.extension import Menu, loader from django.core.urlresolvers import reverse +from django.conf import settings def lava(request): @@ -47,4 +48,10 @@ def openid_available(request): openid_enabled = "django_openid_auth.auth.OpenIDBackend" in lava_server.settings.common.AUTHENTICATION_BACKENDS - return {"openid_available": openid_enabled} + # Check if we use generic OpenID or Launchpad.net + openid_url = getattr(settings, "OPENID_SSO_SERVER_URL", "") + if "ubuntu.com" in openid_url or "launchpad.net" in openid_url: + provider = 'Launchpad.net' + else: + provider = "OpenID" + return {"openid_available": openid_enabled, "openid_provider": provider} === modified file 'lava_server/templates/registration/login.html' --- lava_server/templates/registration/login.html 2012-05-11 20:11:09 +0000 +++ lava_server/templates/registration/login.html 2013-07-23 13:29:45 +0000 @@ -40,7 +40,7 @@ {% if openid_available %} - + @@ -51,10 +51,10 @@ {% blocktrans %}

Thanks to the OpenID technology you can use your existing launchpad.net account to + >OpenID technology you can use your existing + {{ openid_provider }} account to access the dashboard.

-

This is the preferred method as you don't need to worry about +

This is the recommended method as you don't need to worry about having to maintain another account just for this website.

{% endblocktrans %} @@ -79,7 +79,7 @@ {% if openid_available %} {% endif %}
{% trans "Use Launchpad.net account" %}{% blocktrans %}Use {{ openid_provider }} account{% endblocktrans %} {% trans "Use custom account" %}
{% trans "Sign in with Launchpad.net" %} + >{% blocktrans %}Sign in with {{ openid_provider }}{% endblocktrans %}