Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
bug 1121918 - code review cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
groovecoder committed Jan 26, 2015
1 parent ccf9992 commit 2ed192c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions kuma/authkeys/templates/authkeys/list.html
Expand Up @@ -32,9 +32,9 @@
{% endif %}

{% else %}
<p>{% trans %}
<p>{% trans bugzilla_url="https://bugzilla.mozilla.org/enter_bug.cgi?format=__standard__&product=Mozilla Developer Network&component=User management" %}
You need a special permission to use API keys.
You may request permission by <a href="https://bugzilla.mozilla.org/enter_bug.cgi?format=__standard__&product=Mozilla Developer Network&component=User management">filing a bug</a>.
You may request permission by <a href="{{ bugzilla_url }}">filing a bug</a>.
{% endtrans %}
</p>

Expand Down
2 changes: 2 additions & 0 deletions kuma/authkeys/views.py
Expand Up @@ -11,6 +11,7 @@
ITEMS_PER_PAGE = 15


@login_required
@permission_required('authkeys.add_key', raise_exception=True)
def new(request):
context = {"key": None}
Expand Down Expand Up @@ -48,6 +49,7 @@ def history(request, pk):
return render(request, 'authkeys/history.html', context)


@login_required
@permission_required('authkeys.delete_key', raise_exception=True)
def delete(request, pk):
key = get_object_or_404(Key, pk=pk)
Expand Down
2 changes: 1 addition & 1 deletion kuma/users/helpers.py
Expand Up @@ -55,7 +55,7 @@ def admin_link(context, user):
"""Returns a link to admin a user"""
link = ''
url = reverse('admin:auth_user_change', args=(user.id,))
link = '<a href="%s" class="button neutral">%s<i aria-hidden="true" class="icon-lock"></i></a>' % (url, _('Admin'))
link = '<a href="%s" class="button neutral">%s<i aria-hidden="true" class="icon-wrench"></i></a>' % (url, _('Admin'))
return Markup(link)


Expand Down

0 comments on commit 2ed192c

Please sign in to comment.