diff options
18 files changed, 85 insertions, 13 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index 3b281d48..cea41303 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php | |||
@@ -300,6 +300,34 @@ class ConfigController extends Controller | |||
300 | } | 300 | } |
301 | 301 | ||
302 | /** | 302 | /** |
303 | * @param Request $request | ||
304 | * | ||
305 | * @Route("/revoke-token", name="revoke_token") | ||
306 | * | ||
307 | * @return RedirectResponse|JsonResponse | ||
308 | */ | ||
309 | public function revokeTokenAction(Request $request) | ||
310 | { | ||
311 | $config = $this->getConfig(); | ||
312 | $config->setFeedToken(null); | ||
313 | |||
314 | $em = $this->getDoctrine()->getManager(); | ||
315 | $em->persist($config); | ||
316 | $em->flush(); | ||
317 | |||
318 | if ($request->isXmlHttpRequest()) { | ||
319 | return new JsonResponse(); | ||
320 | } | ||
321 | |||
322 | $this->addFlash( | ||
323 | 'notice', | ||
324 | 'flashes.config.notice.feed_token_revoked' | ||
325 | ); | ||
326 | |||
327 | return $this->redirect($this->generateUrl('config') . '#set2'); | ||
328 | } | ||
329 | |||
330 | /** | ||
303 | * Deletes a tagging rule and redirect to the config homepage. | 331 | * Deletes a tagging rule and redirect to the config homepage. |
304 | * | 332 | * |
305 | * @param TaggingRule $rule | 333 | * @param TaggingRule $rule |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index e04c2ff1..330b2755 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | |||
@@ -91,6 +91,7 @@ config: | |||
91 | no_token: 'Intet token' | 91 | no_token: 'Intet token' |
92 | token_create: 'Opret token' | 92 | token_create: 'Opret token' |
93 | token_reset: 'Nulstil token' | 93 | token_reset: 'Nulstil token' |
94 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'RSS-Links' | 95 | feed_links: 'RSS-Links' |
95 | feed_link: | 96 | feed_link: |
96 | unread: 'Ulæst' | 97 | unread: 'Ulæst' |
@@ -593,6 +594,7 @@ flashes: | |||
593 | # tagging_rules_updated: 'Tagging rules updated' | 594 | # tagging_rules_updated: 'Tagging rules updated' |
594 | # tagging_rules_deleted: 'Tagging rule deleted' | 595 | # tagging_rules_deleted: 'Tagging rule deleted' |
595 | # feed_token_updated: 'RSS token updated' | 596 | # feed_token_updated: 'RSS token updated' |
597 | # feed_token_revoked: 'RSS token revoked' | ||
596 | # annotations_reset: Annotations reset | 598 | # annotations_reset: Annotations reset |
597 | # tags_reset: Tags reset | 599 | # tags_reset: Tags reset |
598 | # entries_reset: Entries reset | 600 | # entries_reset: Entries reset |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index 5a9668a9..6f81dc9a 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | |||
@@ -91,6 +91,7 @@ config: | |||
91 | no_token: 'Kein Token' | 91 | no_token: 'Kein Token' |
92 | token_create: 'Token erstellen' | 92 | token_create: 'Token erstellen' |
93 | token_reset: 'Token zurücksetzen' | 93 | token_reset: 'Token zurücksetzen' |
94 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'RSS-Links' | 95 | feed_links: 'RSS-Links' |
95 | feed_link: | 96 | feed_link: |
96 | unread: 'Ungelesene' | 97 | unread: 'Ungelesene' |
@@ -584,6 +585,7 @@ flashes: | |||
584 | tagging_rules_updated: 'Tagging-Regeln aktualisiert' | 585 | tagging_rules_updated: 'Tagging-Regeln aktualisiert' |
585 | tagging_rules_deleted: 'Tagging-Regel gelöscht' | 586 | tagging_rules_deleted: 'Tagging-Regel gelöscht' |
586 | feed_token_updated: 'RSS-Token aktualisiert' | 587 | feed_token_updated: 'RSS-Token aktualisiert' |
588 | # feed_token_revoked: 'RSS token revoked' | ||
587 | annotations_reset: Anmerkungen zurücksetzen | 589 | annotations_reset: Anmerkungen zurücksetzen |
588 | tags_reset: Tags zurücksetzen | 590 | tags_reset: Tags zurücksetzen |
589 | entries_reset: Einträge zurücksetzen | 591 | entries_reset: Einträge zurücksetzen |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index e2994f53..8533f82a 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | |||
@@ -91,6 +91,7 @@ config: | |||
91 | no_token: 'No token' | 91 | no_token: 'No token' |
92 | token_create: 'Create your token' | 92 | token_create: 'Create your token' |
93 | token_reset: 'Regenerate your token' | 93 | token_reset: 'Regenerate your token' |
94 | token_revoke: 'Revoke the token' | ||
94 | feed_links: 'Feed links' | 95 | feed_links: 'Feed links' |
95 | feed_link: | 96 | feed_link: |
96 | unread: 'Unread' | 97 | unread: 'Unread' |
@@ -593,6 +594,7 @@ flashes: | |||
593 | tagging_rules_updated: 'Tagging rules updated' | 594 | tagging_rules_updated: 'Tagging rules updated' |
594 | tagging_rules_deleted: 'Tagging rule deleted' | 595 | tagging_rules_deleted: 'Tagging rule deleted' |
595 | feed_token_updated: 'Feed token updated' | 596 | feed_token_updated: 'Feed token updated' |
597 | feed_token_revoked: 'RSS token revoked' | ||
596 | annotations_reset: Annotations reset | 598 | annotations_reset: Annotations reset |
597 | tags_reset: Tags reset | 599 | tags_reset: Tags reset |
598 | entries_reset: Entries reset | 600 | entries_reset: Entries reset |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index d1ccfc81..51f3d69d 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | |||
@@ -91,6 +91,7 @@ config: | |||
91 | no_token: 'Sin token' | 91 | no_token: 'Sin token' |
92 | token_create: 'Crear token' | 92 | token_create: 'Crear token' |
93 | token_reset: 'Reiniciar token' | 93 | token_reset: 'Reiniciar token' |
94 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'URLs de feeds RSS' | 95 | feed_links: 'URLs de feeds RSS' |
95 | feed_link: | 96 | feed_link: |
96 | unread: 'sin leer' | 97 | unread: 'sin leer' |
@@ -593,6 +594,7 @@ flashes: | |||
593 | tagging_rules_updated: 'Regla de etiquetado actualizada' | 594 | tagging_rules_updated: 'Regla de etiquetado actualizada' |
594 | tagging_rules_deleted: 'Regla de etiquetado eliminada' | 595 | tagging_rules_deleted: 'Regla de etiquetado eliminada' |
595 | feed_token_updated: 'Token RSS actualizado' | 596 | feed_token_updated: 'Token RSS actualizado' |
597 | # feed_token_revoked: 'RSS token revoked' | ||
596 | annotations_reset: Anotaciones reiniciadas | 598 | annotations_reset: Anotaciones reiniciadas |
597 | tags_reset: Etiquetas reiniciadas | 599 | tags_reset: Etiquetas reiniciadas |
598 | entries_reset: Artículos reiniciados | 600 | entries_reset: Artículos reiniciados |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index e5d36bd3..6a9cd09b 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | |||
@@ -91,6 +91,7 @@ config: | |||
91 | no_token: 'بدون کد' | 91 | no_token: 'بدون کد' |
92 | token_create: 'کد خود را بسازید' | 92 | token_create: 'کد خود را بسازید' |
93 | token_reset: 'بازنشانی کد' | 93 | token_reset: 'بازنشانی کد' |
94 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'پیوند آر-اس-اس' | 95 | feed_links: 'پیوند آر-اس-اس' |
95 | feed_link: | 96 | feed_link: |
96 | unread: 'خواندهنشده' | 97 | unread: 'خواندهنشده' |
@@ -593,6 +594,7 @@ flashes: | |||
593 | tagging_rules_updated: 'برچسبگذاری خودکار بهروز شد' | 594 | tagging_rules_updated: 'برچسبگذاری خودکار بهروز شد' |
594 | tagging_rules_deleted: 'قانون برچسبگذاری پاک شد' | 595 | tagging_rules_deleted: 'قانون برچسبگذاری پاک شد' |
595 | feed_token_updated: 'کد آر-اس-اس بهروز شد' | 596 | feed_token_updated: 'کد آر-اس-اس بهروز شد' |
597 | # feed_token_revoked: 'RSS token revoked' | ||
596 | # annotations_reset: Annotations reset | 598 | # annotations_reset: Annotations reset |
597 | # tags_reset: Tags reset | 599 | # tags_reset: Tags reset |
598 | # entries_reset: Entries reset | 600 | # entries_reset: Entries reset |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 0b1853a4..0367ec48 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | |||
@@ -91,6 +91,7 @@ config: | |||
91 | no_token: "Aucun jeton généré" | 91 | no_token: "Aucun jeton généré" |
92 | token_create: "Créez votre jeton" | 92 | token_create: "Créez votre jeton" |
93 | token_reset: "Réinitialisez votre jeton" | 93 | token_reset: "Réinitialisez votre jeton" |
94 | token_revoke: 'Supprimer le jeton' | ||
94 | feed_links: "Adresses de vos flux" | 95 | feed_links: "Adresses de vos flux" |
95 | feed_link: | 96 | feed_link: |
96 | unread: "Non lus" | 97 | unread: "Non lus" |
@@ -594,6 +595,7 @@ flashes: | |||
594 | tagging_rules_updated: "Règles mises à jour" | 595 | tagging_rules_updated: "Règles mises à jour" |
595 | tagging_rules_deleted: "Règle supprimée" | 596 | tagging_rules_deleted: "Règle supprimée" |
596 | feed_token_updated: "Jeton des flux mis à jour" | 597 | feed_token_updated: "Jeton des flux mis à jour" |
598 | feed_token_revoked: 'Jeton des flux supprimé' | ||
597 | annotations_reset: "Annotations supprimées" | 599 | annotations_reset: "Annotations supprimées" |
598 | tags_reset: "Tags supprimés" | 600 | tags_reset: "Tags supprimés" |
599 | entries_reset: "Articles supprimés" | 601 | entries_reset: "Articles supprimés" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 0474d2bc..02a6145c 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | |||
@@ -91,6 +91,7 @@ config: | |||
91 | no_token: 'Nessun token' | 91 | no_token: 'Nessun token' |
92 | token_create: 'Crea il tuo token' | 92 | token_create: 'Crea il tuo token' |
93 | token_reset: 'Rigenera il tuo token' | 93 | token_reset: 'Rigenera il tuo token' |
94 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'Collegamenti RSS' | 95 | feed_links: 'Collegamenti RSS' |
95 | feed_link: | 96 | feed_link: |
96 | unread: 'Non letti' | 97 | unread: 'Non letti' |
@@ -592,6 +593,7 @@ flashes: | |||
592 | tagging_rules_updated: 'Regole di etichettatura aggiornate' | 593 | tagging_rules_updated: 'Regole di etichettatura aggiornate' |
593 | tagging_rules_deleted: 'Regola di etichettatura eliminate' | 594 | tagging_rules_deleted: 'Regola di etichettatura eliminate' |
594 | feed_token_updated: 'RSS token aggiornato' | 595 | feed_token_updated: 'RSS token aggiornato' |
596 | # feed_token_revoked: 'RSS token revoked' | ||
595 | annotations_reset: Reset annotazioni | 597 | annotations_reset: Reset annotazioni |
596 | tags_reset: Reset etichette | 598 | tags_reset: Reset etichette |
597 | entries_reset: Reset articoli | 599 | entries_reset: Reset articoli |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index e761832e..aadc8358 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | |||
@@ -91,6 +91,7 @@ config: | |||
91 | no_token: 'Pas cap de geton generat' | 91 | no_token: 'Pas cap de geton generat' |
92 | token_create: 'Creatz vòstre geton' | 92 | token_create: 'Creatz vòstre geton' |
93 | token_reset: 'Reïnicializatz vòstre geton' | 93 | token_reset: 'Reïnicializatz vòstre geton' |
94 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'URLs de vòstres fluxes RSS' | 95 | feed_links: 'URLs de vòstres fluxes RSS' |
95 | feed_link: | 96 | feed_link: |
96 | unread: 'Pas legits' | 97 | unread: 'Pas legits' |
@@ -592,6 +593,7 @@ flashes: | |||
592 | tagging_rules_updated: 'Règlas misa a jorn' | 593 | tagging_rules_updated: 'Règlas misa a jorn' |
593 | tagging_rules_deleted: 'Règla suprimida' | 594 | tagging_rules_deleted: 'Règla suprimida' |
594 | feed_token_updated: 'Geton RSS mes a jorn' | 595 | feed_token_updated: 'Geton RSS mes a jorn' |
596 | # feed_token_revoked: 'RSS token revoked' | ||
595 | annotations_reset: Anotacions levadas | 597 | annotations_reset: Anotacions levadas |
596 | tags_reset: Etiquetas levadas | 598 | tags_reset: Etiquetas levadas |
597 | entries_reset: Articles levats | 599 | entries_reset: Articles levats |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index f3d506e5..780251d8 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | |||
@@ -91,6 +91,7 @@ config: | |||
91 | no_token: 'Brak tokena' | 91 | no_token: 'Brak tokena' |
92 | token_create: 'Stwórz tokena' | 92 | token_create: 'Stwórz tokena' |
93 | token_reset: 'Zresetuj swojego tokena' | 93 | token_reset: 'Zresetuj swojego tokena' |
94 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'RSS links' | 95 | feed_links: 'RSS links' |
95 | feed_link: | 96 | feed_link: |
96 | unread: 'Nieprzeczytane' | 97 | unread: 'Nieprzeczytane' |
@@ -592,6 +593,7 @@ flashes: | |||
592 | tagging_rules_updated: 'Reguły tagowania zaktualizowane' | 593 | tagging_rules_updated: 'Reguły tagowania zaktualizowane' |
593 | tagging_rules_deleted: 'Reguła tagowania usunięta' | 594 | tagging_rules_deleted: 'Reguła tagowania usunięta' |
594 | feed_token_updated: 'Token kanału RSS zaktualizowany' | 595 | feed_token_updated: 'Token kanału RSS zaktualizowany' |
596 | # feed_token_revoked: 'RSS token revoked' | ||
595 | annotations_reset: Zresetuj adnotacje | 597 | annotations_reset: Zresetuj adnotacje |
596 | tags_reset: Zresetuj tagi | 598 | tags_reset: Zresetuj tagi |
597 | entries_reset: Zresetuj wpisy | 599 | entries_reset: Zresetuj wpisy |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index 6ddc1fc1..e811c821 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml | |||
@@ -91,6 +91,7 @@ config: | |||
91 | no_token: 'Nenhum Token' | 91 | no_token: 'Nenhum Token' |
92 | token_create: 'Criar seu token' | 92 | token_create: 'Criar seu token' |
93 | token_reset: 'Gerar novamente seu token' | 93 | token_reset: 'Gerar novamente seu token' |
94 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'Links RSS' | 95 | feed_links: 'Links RSS' |
95 | feed_link: | 96 | feed_link: |
96 | unread: 'Não lido' | 97 | unread: 'Não lido' |
@@ -592,6 +593,7 @@ flashes: | |||
592 | tagging_rules_updated: 'Regras de tags atualizadas' | 593 | tagging_rules_updated: 'Regras de tags atualizadas' |
593 | tagging_rules_deleted: 'Regra de tag apagada' | 594 | tagging_rules_deleted: 'Regra de tag apagada' |
594 | feed_token_updated: 'Token RSS atualizado' | 595 | feed_token_updated: 'Token RSS atualizado' |
596 | # feed_token_revoked: 'RSS token revoked' | ||
595 | # annotations_reset: Annotations reset | 597 | # annotations_reset: Annotations reset |
596 | # tags_reset: Tags reset | 598 | # tags_reset: Tags reset |
597 | # entries_reset: Entries reset | 599 | # entries_reset: Entries reset |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 8c0791f0..4e2067d3 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | |||
@@ -91,6 +91,7 @@ config: | |||
91 | no_token: 'Fără token' | 91 | no_token: 'Fără token' |
92 | token_create: 'Crează-ți token' | 92 | token_create: 'Crează-ți token' |
93 | token_reset: 'Resetează-ți token-ul' | 93 | token_reset: 'Resetează-ți token-ul' |
94 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'Link-uri RSS' | 95 | feed_links: 'Link-uri RSS' |
95 | feed_link: | 96 | feed_link: |
96 | unread: 'Unread' | 97 | unread: 'Unread' |
@@ -592,6 +593,7 @@ flashes: | |||
592 | # tagging_rules_updated: 'Tagging rules updated' | 593 | # tagging_rules_updated: 'Tagging rules updated' |
593 | # tagging_rules_deleted: 'Tagging rule deleted' | 594 | # tagging_rules_deleted: 'Tagging rule deleted' |
594 | # feed_token_updated: 'RSS token updated' | 595 | # feed_token_updated: 'RSS token updated' |
596 | # feed_token_revoked: 'RSS token revoked' | ||
595 | # annotations_reset: Annotations reset | 597 | # annotations_reset: Annotations reset |
596 | # tags_reset: Tags reset | 598 | # tags_reset: Tags reset |
597 | # entries_reset: Entries reset | 599 | # entries_reset: Entries reset |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml index 2ee2d83a..d1040a6b 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml | |||
@@ -89,6 +89,7 @@ config: | |||
89 | no_token: 'Ключ не задан' | 89 | no_token: 'Ключ не задан' |
90 | token_create: 'Создать ключ' | 90 | token_create: 'Создать ключ' |
91 | token_reset: 'Пересоздать ключ' | 91 | token_reset: 'Пересоздать ключ' |
92 | # token_revoke: 'Revoke the token' | ||
92 | feed_links: 'ссылка на RSS' | 93 | feed_links: 'ссылка на RSS' |
93 | feed_link: | 94 | feed_link: |
94 | unread: 'непрочитанные' | 95 | unread: 'непрочитанные' |
@@ -558,6 +559,7 @@ flashes: | |||
558 | tagging_rules_updated: 'Правила тегировния обновлены' | 559 | tagging_rules_updated: 'Правила тегировния обновлены' |
559 | tagging_rules_deleted: 'Правила тегировния удалены' | 560 | tagging_rules_deleted: 'Правила тегировния удалены' |
560 | feed_token_updated: 'RSS ключ обновлен' | 561 | feed_token_updated: 'RSS ключ обновлен' |
562 | # feed_token_revoked: 'RSS token revoked' | ||
561 | annotations_reset: "Аннотации сброшены" | 563 | annotations_reset: "Аннотации сброшены" |
562 | tags_reset: "Теги сброшены" | 564 | tags_reset: "Теги сброшены" |
563 | entries_reset: "Записи сброшены" | 565 | entries_reset: "Записи сброшены" |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml index 967ae427..bf2bd1f5 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml | |||
@@ -91,6 +91,7 @@ config: | |||
91 | no_token: 'ไม่มีเครื่องหมาย' | 91 | no_token: 'ไม่มีเครื่องหมาย' |
92 | token_create: 'สร้างเครื่องหมาย' | 92 | token_create: 'สร้างเครื่องหมาย' |
93 | token_reset: 'ทำเครื่องหมาย' | 93 | token_reset: 'ทำเครื่องหมาย' |
94 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'ลิงค์ RSS' | 95 | feed_links: 'ลิงค์ RSS' |
95 | feed_link: | 96 | feed_link: |
96 | unread: 'ยังไมได้่อ่าน' | 97 | unread: 'ยังไมได้่อ่าน' |
@@ -590,6 +591,7 @@ flashes: | |||
590 | tagging_rules_updated: 'อัปเดตการแท็กข้อบังคับ' | 591 | tagging_rules_updated: 'อัปเดตการแท็กข้อบังคับ' |
591 | tagging_rules_deleted: 'การลบข้อบังคับของแท็ก' | 592 | tagging_rules_deleted: 'การลบข้อบังคับของแท็ก' |
592 | feed_token_updated: 'อัปเดตเครื่องหมาย RSS ' | 593 | feed_token_updated: 'อัปเดตเครื่องหมาย RSS ' |
594 | # feed_token_revoked: 'RSS token revoked' | ||
593 | annotations_reset: รีเซ็ตหมายเหตุ | 595 | annotations_reset: รีเซ็ตหมายเหตุ |
594 | tags_reset: รีเซ็ตแท็ก | 596 | tags_reset: รีเซ็ตแท็ก |
595 | entries_reset: รีเซ็ตรายการ | 597 | entries_reset: รีเซ็ตรายการ |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index 2f86f25d..93fb6ca1 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | |||
@@ -91,6 +91,7 @@ config: | |||
91 | no_token: 'Belirteç (token) yok' | 91 | no_token: 'Belirteç (token) yok' |
92 | token_create: 'Yeni belirteç (token) oluştur' | 92 | token_create: 'Yeni belirteç (token) oluştur' |
93 | token_reset: 'Belirteci (token) sıfırla' | 93 | token_reset: 'Belirteci (token) sıfırla' |
94 | # token_revoke: 'Revoke the token' | ||
94 | feed_links: 'RSS akış bağlantıları' | 95 | feed_links: 'RSS akış bağlantıları' |
95 | feed_link: | 96 | feed_link: |
96 | unread: 'Okunmayan' | 97 | unread: 'Okunmayan' |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig index 4ef6ab3c..a1caf242 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig | |||
@@ -111,14 +111,14 @@ | |||
111 | {% else %} | 111 | {% else %} |
112 | <em>{{ 'config.form_feed.no_token'|trans }}</em> | 112 | <em>{{ 'config.form_feed.no_token'|trans }}</em> |
113 | {% endif %} | 113 | {% endif %} |
114 | – | 114 | |
115 | <a href="{{ path('generate_token') }}"> | 115 | {% if feed.token %} |
116 | {% if feed.token %} | 116 | – <a href="{{ path('generate_token') }}">{{ 'config.form_feed.token_reset'|trans }}</a> |
117 | {{ 'config.form_feed.token_reset'|trans }} | 117 | – <a href="{{ path('revoke_token') }}">{{ 'config.form_feed.token_revoke'|trans }}</a> |
118 | {% else %} | 118 | {% else %} |
119 | {{ 'config.form_feed.token_create'|trans }} | 119 | – <a href="{{ path('generate_token') }}">{{ 'config.form_feed.token_create'|trans }}</a> |
120 | {% endif %} | 120 | {% endif %} |
121 | </a> | 121 | |
122 | </div> | 122 | </div> |
123 | </fieldset> | 123 | </fieldset> |
124 | 124 | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig index 818fc4e7..a48c9e28 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig | |||
@@ -140,12 +140,13 @@ | |||
140 | {% else %} | 140 | {% else %} |
141 | <em>{{ 'config.form_feed.no_token'|trans }}</em> | 141 | <em>{{ 'config.form_feed.no_token'|trans }}</em> |
142 | {% endif %} | 142 | {% endif %} |
143 | – <a href="{{ path('generate_token') }}"> | 143 | |
144 | {% if feed.token %} | 144 | {% if feed.token %} |
145 | {{ 'config.form_feed.token_reset'|trans }} | 145 | – <a href="{{ path('generate_token') }}">{{ 'config.form_feed.token_reset'|trans }}</a> |
146 | – <a href="{{ path('revoke_token') }}">{{ 'config.form_feed.token_revoke'|trans }}</a> | ||
146 | {% else %} | 147 | {% else %} |
147 | {{ 'config.form_feed.token_create'|trans }} | 148 | – <a href="{{ path('generate_token') }}">{{ 'config.form_feed.token_create'|trans }}</a> |
148 | {% endif %}</a> | 149 | {% endif %} |
149 | </div> | 150 | </div> |
150 | </div> | 151 | </div> |
151 | </div> | 152 | </div> |
diff --git a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php index d8478ce3..b9e0bed2 100644 --- a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php | |||
@@ -330,7 +330,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
330 | $crawler = $client->followRedirect(); | 330 | $crawler = $client->followRedirect(); |
331 | 331 | ||
332 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); | 332 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); |
333 | $this->assertNotContains('config.form_feed.no_token', $body[0]); | 333 | $this->assertContains('config.form_feed.token_reset', $body[0]); |
334 | } | 334 | } |
335 | 335 | ||
336 | public function testGenerateTokenAjax() | 336 | public function testGenerateTokenAjax() |
@@ -351,6 +351,22 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
351 | $this->assertArrayHasKey('token', $content); | 351 | $this->assertArrayHasKey('token', $content); |
352 | } | 352 | } |
353 | 353 | ||
354 | public function testRevokeTokenAjax() | ||
355 | { | ||
356 | $this->logInAs('admin'); | ||
357 | $client = $this->getClient(); | ||
358 | |||
359 | $client->request( | ||
360 | 'GET', | ||
361 | '/revoke-token', | ||
362 | [], | ||
363 | [], | ||
364 | ['HTTP_X-Requested-With' => 'XMLHttpRequest'] | ||
365 | ); | ||
366 | |||
367 | $this->assertSame(200, $client->getResponse()->getStatusCode()); | ||
368 | } | ||
369 | |||
354 | public function testFeedUpdate() | 370 | public function testFeedUpdate() |
355 | { | 371 | { |
356 | $this->logInAs('admin'); | 372 | $this->logInAs('admin'); |