From b8427f22f06cab58383ec3080f09715c712c65ef Mon Sep 17 00:00:00 2001
From: Jeremy Benoist
Date: Mon, 1 May 2017 22:13:35 +0200
Subject: Add menu access to site credentials CRUD
---
src/Wallabag/CoreBundle/Resources/config/services.yml | 2 +-
src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | 1 +
src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | 1 +
src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | 1 +
src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | 1 +
src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | 1 +
src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | 1 +
src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | 1 +
src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | 1 +
src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | 1 +
src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml | 1 +
src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | 1 +
src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | 1 +
.../Resources/views/themes/baggy/SiteCredential/edit.html.twig | 2 +-
.../Resources/views/themes/baggy/SiteCredential/index.html.twig | 4 ++--
.../Resources/views/themes/baggy/SiteCredential/new.html.twig | 2 +-
.../CoreBundle/Resources/views/themes/baggy/layout.html.twig | 3 +++
.../CoreBundle/Resources/views/themes/material/layout.html.twig | 5 +++++
18 files changed, 25 insertions(+), 5 deletions(-)
(limited to 'src/Wallabag/CoreBundle/Resources')
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml
index a59152d3..09bc77fe 100644
--- a/src/Wallabag/CoreBundle/Resources/config/services.yml
+++ b/src/Wallabag/CoreBundle/Resources/config/services.yml
@@ -63,7 +63,7 @@ services:
class: Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder
arguments:
- "@wallabag_core.graby.config_builder"
- - "@=service('security.token_storage').getToken().getUser()"
+ - "@security.token_storage"
- "@wallabag_core.site_credential_repository"
- '@logger'
tags:
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
index ef58a16b..3a3fb91d 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
@@ -32,6 +32,7 @@ menu:
# save_link: 'Save a link'
back_to_unread: 'Tilbage til de ulæste artikler'
# users_management: 'Users management'
+ # site_credentials: 'Site credentials'
top:
add_new_entry: 'Tilføj ny artikel'
search: 'Søg'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
index d026a030..85f0e1a3 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
@@ -32,6 +32,7 @@ menu:
save_link: 'Link speichern'
back_to_unread: 'Zurück zu ungelesenen Artikeln'
users_management: 'Benutzerverwaltung'
+ # site_credentials: 'Site credentials'
top:
add_new_entry: 'Neuen Artikel hinzufügen'
search: 'Suche'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
index 12feb7dd..284fa2fb 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
@@ -32,6 +32,7 @@ menu:
save_link: 'Save a link'
back_to_unread: 'Back to unread articles'
users_management: 'Users management'
+ site_credentials: 'Site credentials'
top:
add_new_entry: 'Add a new entry'
search: 'Search'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
index 2351d467..33bb879c 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
@@ -32,6 +32,7 @@ menu:
save_link: 'Guardar un enlace'
back_to_unread: 'Volver a los artículos sin leer'
users_management: 'Configuración de usuarios'
+ # site_credentials: 'Site credentials'
top:
add_new_entry: 'Añadir un nuevo artículo'
search: 'Buscar'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
index 32e1ff42..90eb119c 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
@@ -32,6 +32,7 @@ menu:
save_link: 'ذخیرهٔ یک پیوند'
back_to_unread: 'بازگشت به خواندهنشدهها'
# users_management: 'Users management'
+ # site_credentials: 'Site credentials'
top:
add_new_entry: 'افزودن مقالهٔ تازه'
search: 'جستجو'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
index 17eaf015..542ddf48 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -32,6 +32,7 @@ menu:
save_link: "Sauvegarder un nouvel article"
back_to_unread: "Retour aux articles non lus"
users_management: "Gestion des utilisateurs"
+ site_credentials: 'Accès aux sites'
top:
add_new_entry: "Sauvegarder un nouvel article"
search: "Rechercher"
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
index 752085c8..5cb2a68f 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
@@ -32,6 +32,7 @@ menu:
save_link: 'Salva collegamento'
back_to_unread: 'Torna ai contenuti non letti'
# users_management: 'Users management'
+ # site_credentials: 'Site credentials'
top:
add_new_entry: 'Aggiungi un nuovo contenuto'
search: 'Cerca'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
index 9e941de0..bc11b2a4 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
@@ -32,6 +32,7 @@ menu:
save_link: 'Enregistrar un novèl article'
back_to_unread: 'Tornar als articles pas legits'
users_management: 'Gestion dels utilizaires'
+ # site_credentials: 'Site credentials'
top:
add_new_entry: 'Enregistrar un novèl article'
search: 'Cercar'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
index 38e051f5..033d6ac5 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
@@ -32,6 +32,7 @@ menu:
save_link: 'Zapisz link'
back_to_unread: 'Powrót do nieprzeczytanych artykułów'
users_management: 'Zarządzanie użytkownikami'
+ # site_credentials: 'Site credentials'
top:
add_new_entry: 'Dodaj nowy wpis'
search: 'Szukaj'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
index d3b245b8..c70c2496 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
@@ -32,6 +32,7 @@ menu:
save_link: 'Salvar um link'
back_to_unread: 'Voltar para os artigos não lidos'
users_management: 'Gestão de Usuários'
+ # site_credentials: 'Site credentials'
top:
add_new_entry: 'Adicionar uma nova entrada'
search: 'Pesquisa'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
index 66c72429..a5dc44f0 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
@@ -32,6 +32,7 @@ menu:
# save_link: 'Save a link'
back_to_unread: 'Înapoi la articolele necitite'
# users_management: 'Users management'
+ # site_credentials: 'Site credentials'
top:
add_new_entry: 'Introdu un nou articol'
search: 'Căutare'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
index 34ae5b87..4d01e7f7 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
@@ -32,6 +32,7 @@ menu:
# save_link: 'Save a link'
back_to_unread: 'Okunmayan makalelere geri dön'
# users_management: 'Users management'
+ # site_credentials: 'Site credentials'
top:
add_new_entry: 'Yeni bir makale ekle'
search: 'Ara'
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/edit.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/edit.html.twig
index 8448f17e..882be430 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/edit.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/edit.html.twig
@@ -49,7 +49,7 @@
{{ form_end(delete_form) }}
- {{ 'site_credential.form.back_to_list'|trans }}
+ {{ 'site_credential.form.back_to_list'|trans }}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/index.html.twig
index fda60b31..c128bceb 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/index.html.twig
@@ -25,7 +25,7 @@
{{ credential.host }} |
{{ credential.username }} |
- {{ 'site_credential.list.edit_action'|trans }}
+ {{ 'site_credential.list.edit_action'|trans }}
|
{% endfor %}
@@ -33,7 +33,7 @@
- {{ 'site_credential.list.create_new_one'|trans }}
+ {{ 'site_credential.list.create_new_one'|trans }}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/new.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/new.html.twig
index bf713902..3c008cde 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/new.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/new.html.twig
@@ -42,7 +42,7 @@
{{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
{{ form_rest(form) }}
- {{ 'site_credential.form.back_to_list'|trans }}
+ {{ 'site_credential.form.back_to_list'|trans }}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig
index 42aeace9..17fa13bb 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig
@@ -38,6 +38,9 @@
{{ render(controller("WallabagCoreBundle:Entry:searchForm", {'currentRoute': app.request.attributes.get('_route')})) }}
+ {% if craue_setting('restricted_access') %}
+
+ {% endif %}
{% if is_granted('ROLE_SUPER_ADMIN') %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
index 2dab1c18..60907e11 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
@@ -66,6 +66,11 @@
{{ 'menu.left.config'|trans }}
+ {% if craue_setting('restricted_access') %}
+
+ {{ 'menu.left.site_credentials'|trans }}
+
+ {% endif %}
{% if is_granted('ROLE_SUPER_ADMIN') %}
{{ 'menu.left.users_management'|trans }}
--
cgit v1.2.3