Skip to content
Extraits de code Groupes Projets
Valider 8ecaac99 rédigé par Matthieu Napoli's avatar Matthieu Napoli
Parcourir les fichiers

Fixes #4616: Show only the first characters of tokens in the admin

Tokens are shown in full only when we click on it.
parent 9df4f668
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -303,4 +303,12 @@ $(document).ready(function () { ...@@ -303,4 +303,12 @@ $(document).ready(function () {
piwik.broadcast.propagateNewPage('segment=&idSite=' + site.id, false); piwik.broadcast.propagateNewPage('segment=&idSite=' + site.id, false);
} }
}); });
// Show the token_auth
$('.token_auth').click(function () {
var token = $(this).data('token');
if ($(this).text() != token) {
$(this).text(token);
}
});
}); });
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
<td id="password" class="editable">-</td> <td id="password" class="editable">-</td>
<td id="email" class="editable">{{ user.email }}</td> <td id="email" class="editable">{{ user.email }}</td>
<td id="alias" class="editable">{{ user.alias|raw }}</td> <td id="alias" class="editable">{{ user.alias|raw }}</td>
<td id="token_auth">{{ user.token_auth }}</td> <td id="token_auth" class="token_auth" data-token="{{ user.token_auth }}">{{ user.token_auth|slice(0, 8) }}</td>
{% if user.last_seen is defined %} {% if user.last_seen is defined %}
<td id="last_seen">{% if user.last_seen is empty %}-{% else %}{{ 'General_TimeAgo'|translate(user.last_seen)|raw }}{% endif %}</td> <td id="last_seen">{% if user.last_seen is empty %}-{% else %}{{ 'General_TimeAgo'|translate(user.last_seen)|raw }}{% endif %}</td>
{% endif %} {% endif %}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter