Merge lp://staging/~canonical-isd-hackers/canonical-identity-provider/bugs-632536-680256-long-query-improvements into lp://staging/canonical-identity-provider/release
Proposed by
Stuart Metcalfe
Status: | Merged |
---|---|
Approved by: | Michael Nelson |
Approved revision: | no longer in the source branch. |
Merged at revision: | 119 |
Proposed branch: | lp://staging/~canonical-isd-hackers/canonical-identity-provider/bugs-632536-680256-long-query-improvements |
Merge into: | lp://staging/canonical-identity-provider/release |
Diff against target: |
141 lines (+36/-21) 5 files modified
identityprovider/templates/consumer/index.html (+4/-0) identityprovider/templates/post-assertion.html (+10/-20) identityprovider/tests/test_middleware.py (+2/-0) identityprovider/tests/test_views_consumer.py (+8/-1) identityprovider/views/consumer.py (+12/-0) |
To merge this branch: | bzr merge lp://staging/~canonical-isd-hackers/canonical-identity-provider/bugs-632536-680256-long-query-improvements |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Anthony Lenton (community) | Approve | ||
Michael Nelson (community) | code | Approve | |
Review via email:
|
Commit message
Simplified post redirect form and added option to test it in the test consumer
Description of the change
This branch simplifies the post redirect form on the identity provider and adds js to auto-submit where enabled (bug #632536). It also adds an associated option to the test consumer to help QA with testing (bug #680256).
To post a comment you must log in.
Hi Stuart!
This is my first CIP branch - so I'm sure I'm missing some context and I have asked some questions that are probably obvious. Sorry if that's painful :P I've not yet set the dev env. up, otherwise I would have tested some of the points below.
It was initially unclear to me which code was for tests only (ie. templates/ consumer/ * and views/consumer.py) - I'm not sure yet why these test-related code and templates are part of the normal application (rather than being a separate test app).
I've marked the MP as approved, but am keen to hear your thoughts on the points below - even if you choose to ignore them :) In retrospect, my main question is related to the only production change - the post-assertion.html template.
Finally, it might not be for this branch, but I can only see a test that verifies the post-assertion.html template is used (in test_middleware) - should there be a test somewhere verifying that the rendered response contains a form with a post action back to the consumer etc.?
Details below.
> === modified file 'identityprovid er/templates/ consumer/ index.html' r/templates/ consumer/ index.html 2010-11-16 15:36:06 +0000 r/templates/ consumer/ index.html 2010-11-23 07:55:27 +0000 forcelongurl" value="1" /> forcelongurl" >Force long return URL</label>
> --- identityprovide
> +++ identityprovide
> @@ -135,6 +135,10 @@
> </table>
> </p>
>
> + <p>
> + <input type="checkbox" name="forcelongurl" id="id-
> + <label for="id-
> + </p>
I'm not sure this is the best way to test for long urls (ie. adding code
to the view that checks for this param which should only be used for testing
etc.). Could it be better to actually include a long URL here?
(rather than fabricating one inside the consumer view)?
It should be easy to do this by changing the above to be a radio option, forcelongurl- false" value="false"> forcelongurl- false"> Normal URL</label> forcelongurl- true" "longurl- longurl- longurl- longurl- longurl- generate- me-in-code- etc"> forcelongurl- true">Long URL (requiring POST back to consumer)</label>
something like:
<input type="radio" name="forcelongurl" id="id-
<label for="id-
<input type="radio" name="forcelongurl" id="id-
value=
<label for="id-
AFAICS, the posted params are passed through during consumer_ views.finishOpe nID - but haven't verified.
> <input type="submit" value="Begin" /> er/templates/ post-assertion. html' r/templates/ post-assertion. html 2010-07-12 19:11:15 +0000 r/templates/ post-assertion. html 2010-11-23 07:55:27 +0000 www.w3. org/TR/ xhtml1/ DTD/xhtml1- transitional. dtd">
> </form>
>
>
> === modified file 'identityprovid
> --- identityprovide
> +++ identityprovide
> @@ -1,27 +1,13 @@
> -{% extends "base.html" %}
> -{% load i18n %}
> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> + "http://
>
> {% comment %}
> Copyright 2010 Canonical Ltd. This software is licensed under the
> GNU Affero General Public License version 3 (see the file LICENSE).
> {% endcomment %}
>
> -{% block title %}
> - {% trans "Continue to 3rd-party site" %}
> -{% endblock %}
> -
> -{% block text_title %}
> - <h1 class="main">{% trans "Continue to 3rd-party site" %}</h1>
> -{% e...