diff options
author | Jessica Tallon <jessica@megworld.co.uk> | 2014-10-01 19:45:53 +0100 |
---|---|---|
committer | Jessica Tallon <jessica@megworld.co.uk> | 2014-10-01 19:45:53 +0100 |
commit | 7e15632b5aeec5c532d8ed026b69dba62f21b21a (patch) | |
tree | dd116242ff9b20f06bb49721e3ad5391ce1290a8 /mediagoblin/templates | |
parent | 36e27c4b76b762c46039fec2b4cfdd4d1955ebef (diff) | |
download | mediagoblin-7e15632b5aeec5c532d8ed026b69dba62f21b21a.tar.lz mediagoblin-7e15632b5aeec5c532d8ed026b69dba62f21b21a.tar.xz mediagoblin-7e15632b5aeec5c532d8ed026b69dba62f21b21a.zip |
Fix #549 - Deauthorize OAuth applications
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r-- | mediagoblin/templates/mediagoblin/edit/deauthorize_applications.html | 69 | ||||
-rw-r--r-- | mediagoblin/templates/mediagoblin/edit/edit_account.html | 5 |
2 files changed, 73 insertions, 1 deletions
diff --git a/mediagoblin/templates/mediagoblin/edit/deauthorize_applications.html b/mediagoblin/templates/mediagoblin/edit/deauthorize_applications.html new file mode 100644 index 00000000..f3b83e4e --- /dev/null +++ b/mediagoblin/templates/mediagoblin/edit/deauthorize_applications.html @@ -0,0 +1,69 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +#} +{%- extends "mediagoblin/base.html" %} + +{% block title -%} + {% trans -%} + Deauthorize applications + {%- endtrans %} — {{ super() }} +{%- endblock %} + +{% block mediagoblin_content %} + <h2>{% trans -%}Deauthorize Applications{%- endtrans %}</h2> + <p>{% trans -%} + These applications can access your GNU MediaGoblin account. Deauthorizing the + application will prevent the application from accessing your account. + {%- endtrans %} + </p> + + <form method="POST" action="{{ request.urlgen('mediagoblin.edit.deauthorize_applications') }}"> + {{ csrf_token }} + {% if not applications %} + <em>{% trans -%}There are no applications authorized.{%- endtrans %}</em> + {% endif %} + {% for application, access in applications %} + <div class="application"> + <div class="application-button"> + <button class="button_action" name="application" value="{{ access.token }}">Deauthorize</button> + </div> + {% if application.get_client.logo_url %} + <img class="application-icon" src="{{ application.get_client.logo_url }}"> + {% else %} + <img class="application-icon" src="{{ request.staticdirect('/images/small-gavroche.png') }}"> + {% endif %} + <div class="application-content"> + <strong>{{ application.get_client.application_name }}</strong> + <p class="application-data"> + <small> + {% trans -%}Type:{%- endtrans %} + + {{ application.get_client.application_type }}</small> + <br /> + <small> + {% trans -%}Authorized:{%- endtrans %} + + {%- trans formatted_time=timesince(access.created) -%} + {{ formatted_time }} ago + {%- endtrans -%} + </small> + </p> + </div> + </div> + {% endfor %} + </form> +{% endblock %}
\ No newline at end of file diff --git a/mediagoblin/templates/mediagoblin/edit/edit_account.html b/mediagoblin/templates/mediagoblin/edit/edit_account.html index 574fe459..14a66482 100644 --- a/mediagoblin/templates/mediagoblin/edit/edit_account.html +++ b/mediagoblin/templates/mediagoblin/edit/edit_account.html @@ -53,7 +53,10 @@ <a href="{{ request.urlgen('mediagoblin.edit.delete_account') }}"> {%- trans %}Delete my account{% endtrans -%} </a> - · + <br /> + <a href="{{ request.urlgen('mediagoblin.edit.deauthorize_applications') }}"> + {%- trans %}Deauthorize applications{% endtrans -%} + </a> {% template_hook("edit_link") %} <a href="{{ request.urlgen('mediagoblin.edit.email') }}"> {% trans %}Email{% endtrans %} |