aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2017-05-01 22:13:35 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2017-06-20 16:03:14 +0200
commitb8427f22f06cab58383ec3080f09715c712c65ef (patch)
tree0f71278c3296774f86cba8cf4381f9aa4f9b3086 /src/Wallabag
parent5a9bc00726ddaf7c8798d4932d0a8b7a38422670 (diff)
downloadwallabag-b8427f22f06cab58383ec3080f09715c712c65ef.tar.gz
wallabag-b8427f22f06cab58383ec3080f09715c712c65ef.tar.zst
wallabag-b8427f22f06cab58383ec3080f09715c712c65ef.zip
Add menu access to site credentials CRUD
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSiteCredentialData.php34
-rw-r--r--src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php18
-rw-r--r--src/Wallabag/CoreBundle/Resources/config/services.yml2
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.da.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.de.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.en.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.es.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.it.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/edit.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/index.html.twig4
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/new.html.twig2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/layout.html.twig3
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig5
20 files changed, 71 insertions, 11 deletions
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSiteCredentialData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSiteCredentialData.php
new file mode 100644
index 00000000..866f55a4
--- /dev/null
+++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSiteCredentialData.php
@@ -0,0 +1,34 @@
1<?php
2
3namespace Wallabag\CoreBundle\DataFixtures\ORM;
4
5use Doctrine\Common\DataFixtures\AbstractFixture;
6use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
7use Doctrine\Common\Persistence\ObjectManager;
8use Wallabag\CoreBundle\Entity\SiteCredential;
9
10class LoadSiteCredentialData extends AbstractFixture implements OrderedFixtureInterface
11{
12 /**
13 * {@inheritdoc}
14 */
15 public function load(ObjectManager $manager)
16 {
17 $credential = new SiteCredential($this->getReference('admin-user'));
18 $credential->setHost('example.com');
19 $credential->setUsername('foo');
20 $credential->setPassword('bar');
21
22 $manager->persist($credential);
23
24 $manager->flush();
25 }
26
27 /**
28 * {@inheritdoc}
29 */
30 public function getOrder()
31 {
32 return 50;
33 }
34}
diff --git a/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php b/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php
index 94615687..ae69492d 100644
--- a/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php
+++ b/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php
@@ -7,7 +7,7 @@ use BD\GuzzleSiteAuthenticator\SiteConfig\SiteConfigBuilder;
7use Graby\SiteConfig\ConfigBuilder; 7use Graby\SiteConfig\ConfigBuilder;
8use Psr\Log\LoggerInterface; 8use Psr\Log\LoggerInterface;
9use Wallabag\CoreBundle\Repository\SiteCredentialRepository; 9use Wallabag\CoreBundle\Repository\SiteCredentialRepository;
10use Wallabag\UserBundle\Entity\User; 10use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
11 11
12class GrabySiteConfigBuilder implements SiteConfigBuilder 12class GrabySiteConfigBuilder implements SiteConfigBuilder
13{ 13{
@@ -27,7 +27,7 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder
27 private $logger; 27 private $logger;
28 28
29 /** 29 /**
30 * @var User 30 * @var Wallabag\UserBundle\Entity\User|null
31 */ 31 */
32 private $currentUser; 32 private $currentUser;
33 33
@@ -36,16 +36,19 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder
36 * GrabySiteConfigBuilder constructor. 36 * GrabySiteConfigBuilder constructor.
37 * 37 *
38 * @param ConfigBuilder $grabyConfigBuilder 38 * @param ConfigBuilder $grabyConfigBuilder
39 * @param User $currentUser 39 * @param TokenStorage $token
40 * @param SiteCredentialRepository $credentialRepository 40 * @param SiteCredentialRepository $credentialRepository
41 * @param LoggerInterface $logger 41 * @param LoggerInterface $logger
42 */ 42 */
43 public function __construct(ConfigBuilder $grabyConfigBuilder, User $currentUser, SiteCredentialRepository $credentialRepository, LoggerInterface $logger) 43 public function __construct(ConfigBuilder $grabyConfigBuilder, TokenStorage $token, SiteCredentialRepository $credentialRepository, LoggerInterface $logger)
44 { 44 {
45 $this->grabyConfigBuilder = $grabyConfigBuilder; 45 $this->grabyConfigBuilder = $grabyConfigBuilder;
46 $this->credentialRepository = $credentialRepository; 46 $this->credentialRepository = $credentialRepository;
47 $this->currentUser = $currentUser;
48 $this->logger = $logger; 47 $this->logger = $logger;
48
49 if ($token->getToken()) {
50 $this->currentUser = $token->getToken()->getUser();
51 }
49 } 52 }
50 53
51 /** 54 /**
@@ -59,7 +62,10 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder
59 $host = substr($host, 4); 62 $host = substr($host, 4);
60 } 63 }
61 64
62 $credentials = $this->credentialRepository->findOneByHostAndUser($host, $this->currentUser->getId()); 65 $credentials = null;
66 if ($this->currentUser) {
67 $credentials = $this->credentialRepository->findOneByHostAndUser($host, $this->currentUser->getId());
68 }
63 69
64 if (null === $credentials) { 70 if (null === $credentials) {
65 $this->logger->debug('Auth: no credentials available for host.', ['host' => $host]); 71 $this->logger->debug('Auth: no credentials available for host.', ['host' => $host]);
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:
63 class: Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder 63 class: Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder
64 arguments: 64 arguments:
65 - "@wallabag_core.graby.config_builder" 65 - "@wallabag_core.graby.config_builder"
66 - "@=service('security.token_storage').getToken().getUser()" 66 - "@security.token_storage"
67 - "@wallabag_core.site_credential_repository" 67 - "@wallabag_core.site_credential_repository"
68 - '@logger' 68 - '@logger'
69 tags: 69 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:
32 # save_link: 'Save a link' 32 # save_link: 'Save a link'
33 back_to_unread: 'Tilbage til de ulæste artikler' 33 back_to_unread: 'Tilbage til de ulæste artikler'
34 # users_management: 'Users management' 34 # users_management: 'Users management'
35 # site_credentials: 'Site credentials'
35 top: 36 top:
36 add_new_entry: 'Tilføj ny artikel' 37 add_new_entry: 'Tilføj ny artikel'
37 search: 'Søg' 38 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:
32 save_link: 'Link speichern' 32 save_link: 'Link speichern'
33 back_to_unread: 'Zurück zu ungelesenen Artikeln' 33 back_to_unread: 'Zurück zu ungelesenen Artikeln'
34 users_management: 'Benutzerverwaltung' 34 users_management: 'Benutzerverwaltung'
35 # site_credentials: 'Site credentials'
35 top: 36 top:
36 add_new_entry: 'Neuen Artikel hinzufügen' 37 add_new_entry: 'Neuen Artikel hinzufügen'
37 search: 'Suche' 38 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:
32 save_link: 'Save a link' 32 save_link: 'Save a link'
33 back_to_unread: 'Back to unread articles' 33 back_to_unread: 'Back to unread articles'
34 users_management: 'Users management' 34 users_management: 'Users management'
35 site_credentials: 'Site credentials'
35 top: 36 top:
36 add_new_entry: 'Add a new entry' 37 add_new_entry: 'Add a new entry'
37 search: 'Search' 38 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:
32 save_link: 'Guardar un enlace' 32 save_link: 'Guardar un enlace'
33 back_to_unread: 'Volver a los artículos sin leer' 33 back_to_unread: 'Volver a los artículos sin leer'
34 users_management: 'Configuración de usuarios' 34 users_management: 'Configuración de usuarios'
35 # site_credentials: 'Site credentials'
35 top: 36 top:
36 add_new_entry: 'Añadir un nuevo artículo' 37 add_new_entry: 'Añadir un nuevo artículo'
37 search: 'Buscar' 38 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:
32 save_link: 'ذخیرهٔ یک پیوند' 32 save_link: 'ذخیرهٔ یک پیوند'
33 back_to_unread: 'بازگشت به خوانده‌نشده‌ها' 33 back_to_unread: 'بازگشت به خوانده‌نشده‌ها'
34 # users_management: 'Users management' 34 # users_management: 'Users management'
35 # site_credentials: 'Site credentials'
35 top: 36 top:
36 add_new_entry: 'افزودن مقالهٔ تازه' 37 add_new_entry: 'افزودن مقالهٔ تازه'
37 search: 'جستجو' 38 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:
32 save_link: "Sauvegarder un nouvel article" 32 save_link: "Sauvegarder un nouvel article"
33 back_to_unread: "Retour aux articles non lus" 33 back_to_unread: "Retour aux articles non lus"
34 users_management: "Gestion des utilisateurs" 34 users_management: "Gestion des utilisateurs"
35 site_credentials: 'Accès aux sites'
35 top: 36 top:
36 add_new_entry: "Sauvegarder un nouvel article" 37 add_new_entry: "Sauvegarder un nouvel article"
37 search: "Rechercher" 38 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:
32 save_link: 'Salva collegamento' 32 save_link: 'Salva collegamento'
33 back_to_unread: 'Torna ai contenuti non letti' 33 back_to_unread: 'Torna ai contenuti non letti'
34 # users_management: 'Users management' 34 # users_management: 'Users management'
35 # site_credentials: 'Site credentials'
35 top: 36 top:
36 add_new_entry: 'Aggiungi un nuovo contenuto' 37 add_new_entry: 'Aggiungi un nuovo contenuto'
37 search: 'Cerca' 38 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:
32 save_link: 'Enregistrar un novèl article' 32 save_link: 'Enregistrar un novèl article'
33 back_to_unread: 'Tornar als articles pas legits' 33 back_to_unread: 'Tornar als articles pas legits'
34 users_management: 'Gestion dels utilizaires' 34 users_management: 'Gestion dels utilizaires'
35 # site_credentials: 'Site credentials'
35 top: 36 top:
36 add_new_entry: 'Enregistrar un novèl article' 37 add_new_entry: 'Enregistrar un novèl article'
37 search: 'Cercar' 38 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:
32 save_link: 'Zapisz link' 32 save_link: 'Zapisz link'
33 back_to_unread: 'Powrót do nieprzeczytanych artykułów' 33 back_to_unread: 'Powrót do nieprzeczytanych artykułów'
34 users_management: 'Zarządzanie użytkownikami' 34 users_management: 'Zarządzanie użytkownikami'
35 # site_credentials: 'Site credentials'
35 top: 36 top:
36 add_new_entry: 'Dodaj nowy wpis' 37 add_new_entry: 'Dodaj nowy wpis'
37 search: 'Szukaj' 38 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:
32 save_link: 'Salvar um link' 32 save_link: 'Salvar um link'
33 back_to_unread: 'Voltar para os artigos não lidos' 33 back_to_unread: 'Voltar para os artigos não lidos'
34 users_management: 'Gestão de Usuários' 34 users_management: 'Gestão de Usuários'
35 # site_credentials: 'Site credentials'
35 top: 36 top:
36 add_new_entry: 'Adicionar uma nova entrada' 37 add_new_entry: 'Adicionar uma nova entrada'
37 search: 'Pesquisa' 38 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:
32 # save_link: 'Save a link' 32 # save_link: 'Save a link'
33 back_to_unread: 'Înapoi la articolele necitite' 33 back_to_unread: 'Înapoi la articolele necitite'
34 # users_management: 'Users management' 34 # users_management: 'Users management'
35 # site_credentials: 'Site credentials'
35 top: 36 top:
36 add_new_entry: 'Introdu un nou articol' 37 add_new_entry: 'Introdu un nou articol'
37 search: 'Căutare' 38 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:
32 # save_link: 'Save a link' 32 # save_link: 'Save a link'
33 back_to_unread: 'Okunmayan makalelere geri dön' 33 back_to_unread: 'Okunmayan makalelere geri dön'
34 # users_management: 'Users management' 34 # users_management: 'Users management'
35 # site_credentials: 'Site credentials'
35 top: 36 top:
36 add_new_entry: 'Yeni bir makale ekle' 37 add_new_entry: 'Yeni bir makale ekle'
37 search: 'Ara' 38 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 @@
49 <button onclick="return confirm('{{ 'site_credential.form.delete_confirm'|trans|escape('js') }}')" type="submit" class="btn waves-effect waves-light red">{{ 'site_credential.form.delete'|trans }}</button> 49 <button onclick="return confirm('{{ 'site_credential.form.delete_confirm'|trans|escape('js') }}')" type="submit" class="btn waves-effect waves-light red">{{ 'site_credential.form.delete'|trans }}</button>
50 {{ form_end(delete_form) }} 50 {{ form_end(delete_form) }}
51 </p> 51 </p>
52 <p><a class="waves-effect waves-light btn blue-grey" href="{{ path('site_credential_index') }}">{{ 'site_credential.form.back_to_list'|trans }}</a></p> 52 <p><a class="waves-effect waves-light btn blue-grey" href="{{ path('site_credentials_index') }}">{{ 'site_credential.form.back_to_list'|trans }}</a></p>
53 </div> 53 </div>
54 </div> 54 </div>
55 </div> 55 </div>
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 @@
25 <td>{{ credential.host }}</td> 25 <td>{{ credential.host }}</td>
26 <td>{{ credential.username }}</td> 26 <td>{{ credential.username }}</td>
27 <td> 27 <td>
28 <a href="{{ path('site_credential_edit', { 'id': credential.id }) }}">{{ 'site_credential.list.edit_action'|trans }}</a> 28 <a href="{{ path('site_credentials_edit', { 'id': credential.id }) }}">{{ 'site_credential.list.edit_action'|trans }}</a>
29 </td> 29 </td>
30 </tr> 30 </tr>
31 {% endfor %} 31 {% endfor %}
@@ -33,7 +33,7 @@
33 </table> 33 </table>
34 <br /> 34 <br />
35 <p> 35 <p>
36 <a href="{{ path('site_credential_new') }}" class="waves-effect waves-light btn">{{ 'site_credential.list.create_new_one'|trans }}</a> 36 <a href="{{ path('site_credentials_new') }}" class="waves-effect waves-light btn">{{ 'site_credential.list.create_new_one'|trans }}</a>
37 </p> 37 </p>
38 </div> 38 </div>
39 </div> 39 </div>
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 @@
42 {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} 42 {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
43 {{ form_rest(form) }} 43 {{ form_rest(form) }}
44 </form> 44 </form>
45 <p><a class="waves-effect waves-light btn blue-grey" href="{{ path('site_credential_index') }}">{{ 'site_credential.form.back_to_list'|trans }}</a></p> 45 <p><a class="waves-effect waves-light btn blue-grey" href="{{ path('site_credentials_index') }}">{{ 'site_credential.form.back_to_list'|trans }}</a></p>
46 </div> 46 </div>
47 </div> 47 </div>
48 </div> 48 </div>
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 @@
38 {{ render(controller("WallabagCoreBundle:Entry:searchForm", {'currentRoute': app.request.attributes.get('_route')})) }} 38 {{ render(controller("WallabagCoreBundle:Entry:searchForm", {'currentRoute': app.request.attributes.get('_route')})) }}
39 </div> 39 </div>
40 </li> 40 </li>
41 {% if craue_setting('restricted_access') %}
42 <li class="menu site_credentials"><a href="{{ path('site_credentials_index') }}">{{ 'menu.left.site_credentials'|trans }}</a></li>
43 {% endif %}
41 <li class="menu config"><a href="{{ path('config') }}">{{ 'menu.left.config'|trans }}</a></li> 44 <li class="menu config"><a href="{{ path('config') }}">{{ 'menu.left.config'|trans }}</a></li>
42 {% if is_granted('ROLE_SUPER_ADMIN') %} 45 {% if is_granted('ROLE_SUPER_ADMIN') %}
43 <li class="menu users"><a href="{{ path('user_index') }}">{{ 'menu.left.users_management'|trans }}</a></li> 46 <li class="menu users"><a href="{{ path('user_index') }}">{{ 'menu.left.users_management'|trans }}</a></li>
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 @@
66 <li class="bold {% if currentRoute == 'config' %}active{% endif %}"> 66 <li class="bold {% if currentRoute == 'config' %}active{% endif %}">
67 <a class="waves-effect" href="{{ path('config') }}">{{ 'menu.left.config'|trans }}</a> 67 <a class="waves-effect" href="{{ path('config') }}">{{ 'menu.left.config'|trans }}</a>
68 </li> 68 </li>
69 {% if craue_setting('restricted_access') %}
70 <li class="bold {% if currentRoute starts with 'site_credentials_' %}active{% endif %}">
71 <a class="waves-effect" href="{{ path('site_credentials_index') }}">{{ 'menu.left.site_credentials'|trans }}</a>
72 </li>
73 {% endif %}
69 {% if is_granted('ROLE_SUPER_ADMIN') %} 74 {% if is_granted('ROLE_SUPER_ADMIN') %}
70 <li class="bold {% if currentRoute starts with 'user_' %}active{% endif %}"> 75 <li class="bold {% if currentRoute starts with 'user_' %}active{% endif %}">
71 <a class="waves-effect" href="{{ path('user_index') }}">{{ 'menu.left.users_management'|trans }}</a> 76 <a class="waves-effect" href="{{ path('user_index') }}">{{ 'menu.left.users_management'|trans }}</a>