From 80c5fb4373bd0799b71b59a6c734c28442da03db Mon Sep 17 00:00:00 2001 From: Nicole Harris Date: Mon, 29 Jul 2019 07:02:23 +0100 Subject: [PATCH] Improve API UI --- warehouse/templates/manage/token.html | 16 +++++++++++++++- warehouse/templates/pages/help.html | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/warehouse/templates/manage/token.html b/warehouse/templates/manage/token.html index e414931314f9..bc61fa414b23 100644 --- a/warehouse/templates/manage/token.html +++ b/warehouse/templates/manage/token.html @@ -30,6 +30,14 @@

{{ title }} Beta featu {% if serialized_macaroon %}

Token for "{{ macaroon.description }}"

+

+ Permissions: Upload packages
+ {% if macaroon.caveats.permissions == "user" %} + Scope: Entire account (all projects) + {% else %} + Scope: Project "{{ macaroon.caveats.permissions.projects[0] }}" + {% endif %} +

For instructions on how to use this token, visit the PyPI help page.

{{ serialized_macaroon }}
@@ -60,6 +68,9 @@

Token for "{{ macaroon.description }}"

{{ form_error_anchor(create_macaroon_form) }}
+ {% if serialized_macaroon %} +

Add another token

+ {% endif %}
{{ form_errors(create_macaroon_form) }} @@ -69,11 +80,14 @@

Token for "{{ macaroon.description }}"

{{ field_errors(create_macaroon_form.description) }}

What is this token for?

+
+ Permissions +

Upload packages

+