aboutsummaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2016-11-22 19:12:53 +0100
committerGitHub <noreply@github.com>2016-11-22 19:12:53 +0100
commit176e0ea3caee9f4eccc1ddda5f84b14da2cca034 (patch)
tree543ff69ee6b56c6383f3f9758221fc64154dee5c /app
parent1d5dd2c2410d7866752bca5d65886afc6a7650ef (diff)
parentd51093a7d964ca720793d0cfcf4af601f2de448a (diff)
downloadwallabag-176e0ea3caee9f4eccc1ddda5f84b14da2cca034.tar.gz
wallabag-176e0ea3caee9f4eccc1ddda5f84b14da2cca034.tar.zst
wallabag-176e0ea3caee9f4eccc1ddda5f84b14da2cca034.zip
Merge pull request #2317 from wallabag/restricted-access
Added authentication for restricted access articles
Diffstat (limited to 'app')
-rw-r--r--app/AppKernel.php1
-rw-r--r--app/DoctrineMigrations/Version20161122144743.php45
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml1
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml1
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml1
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml1
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml1
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml1
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml1
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml1
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml1
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml1
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml1
-rw-r--r--app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml1
-rw-r--r--app/config/parameters.yml.dist3
15 files changed, 61 insertions, 0 deletions
diff --git a/app/AppKernel.php b/app/AppKernel.php
index 81b83ef9..c8382d5f 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -31,6 +31,7 @@ class AppKernel extends Kernel
31 new Craue\ConfigBundle\CraueConfigBundle(), 31 new Craue\ConfigBundle\CraueConfigBundle(),
32 new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(), 32 new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
33 new FOS\JsRoutingBundle\FOSJsRoutingBundle(), 33 new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
34 new BD\GuzzleSiteAuthenticatorBundle\BDGuzzleSiteAuthenticatorBundle(),
34 35
35 // wallabag bundles 36 // wallabag bundles
36 new Wallabag\CoreBundle\WallabagCoreBundle(), 37 new Wallabag\CoreBundle\WallabagCoreBundle(),
diff --git a/app/DoctrineMigrations/Version20161122144743.php b/app/DoctrineMigrations/Version20161122144743.php
new file mode 100644
index 00000000..ec80c48e
--- /dev/null
+++ b/app/DoctrineMigrations/Version20161122144743.php
@@ -0,0 +1,45 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Symfony\Component\DependencyInjection\ContainerAwareInterface;
8use Symfony\Component\DependencyInjection\ContainerInterface;
9
10/**
11 * Add the restricted_access internal setting for articles with paywall
12 */
13class Version20161122144743 extends AbstractMigration implements ContainerAwareInterface
14{
15 /**
16 * @var ContainerInterface
17 */
18 private $container;
19
20 public function setContainer(ContainerInterface $container = null)
21 {
22 $this->container = $container;
23 }
24
25 private function getTable($tableName)
26 {
27 return $this->container->getParameter('database_table_prefix') . $tableName;
28 }
29
30 /**
31 * @param Schema $schema
32 */
33 public function up(Schema $schema)
34 {
35 $this->addSql("INSERT INTO ".$this->getTable('craue_config_setting')." (name, value, section) VALUES ('restricted_access', 0, 'entry')");
36 }
37
38 /**
39 * @param Schema $schema
40 */
41 public function down(Schema $schema)
42 {
43 $this->addSql("DELETE FROM ".$this->getTable('craue_config_setting')." WHERE name = 'restricted_access';");
44 }
45}
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml
index fac3b4f8..c65463db 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml
@@ -32,3 +32,4 @@ demo_mode_enabled: "Aktiver demo-indstilling? (anvendes kun til wallabags offent
32demo_mode_username: "Demobruger" 32demo_mode_username: "Demobruger"
33# share_public: Allow public url for entries 33# share_public: Allow public url for entries
34# download_images_enabled: Download images locally 34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml
index d382733c..bc378147 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml
@@ -32,3 +32,4 @@ demo_mode_enabled: "Test-Modus aktivieren? (nur für die öffentliche wallabag-D
32demo_mode_username: "Test-Benutzer" 32demo_mode_username: "Test-Benutzer"
33share_public: Erlaube eine öffentliche URL für Einträge 33share_public: Erlaube eine öffentliche URL für Einträge
34# download_images_enabled: Download images locally 34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml
index 23de7a43..52cb8e20 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml
@@ -32,3 +32,4 @@ demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
32demo_mode_username: "Demo user" 32demo_mode_username: "Demo user"
33share_public: Allow public url for entries 33share_public: Allow public url for entries
34download_images_enabled: Download images locally 34download_images_enabled: Download images locally
35restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml
index ff1dd04f..dbec0e81 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml
@@ -32,3 +32,4 @@ demo_mode_enabled: "Activar modo demo (sólo usado para la demo de wallabag)"
32demo_mode_username: "Nombre de usuario demo" 32demo_mode_username: "Nombre de usuario demo"
33# share_public: Allow public url for entries 33# share_public: Allow public url for entries
34# download_images_enabled: Download images locally 34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml
index 4e712fdd..7a341e0b 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml
@@ -32,3 +32,4 @@ modify_settings: "اعمال"
32# demo_mode_username: "Demo user" 32# demo_mode_username: "Demo user"
33# share_public: Allow public url for entries 33# share_public: Allow public url for entries
34# download_images_enabled: Download images locally 34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml
index cae4c662..f5c886d6 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml
@@ -32,3 +32,4 @@ demo_mode_enabled: "Activer le mode démo ? (utiliser uniquement pour la démo p
32demo_mode_username: "Utilisateur de la démo" 32demo_mode_username: "Utilisateur de la démo"
33share_public: Autoriser une URL publique pour les articles 33share_public: Autoriser une URL publique pour les articles
34download_images_enabled: Télécharger les images en local 34download_images_enabled: Télécharger les images en local
35restricted_access: Activer l'authentification pour les articles derrière un paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml
index f94f834f..88a1b4f6 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml
@@ -32,3 +32,4 @@ demo_mode_enabled: "Abilita modalità demo ? (usato solo per la demo pubblica di
32demo_mode_username: "Utente Demo" 32demo_mode_username: "Utente Demo"
33# share_public: Allow public url for entries 33# share_public: Allow public url for entries
34# download_images_enabled: Download images locally 34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml
index de60a194..00deeade 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml
@@ -32,3 +32,4 @@ demo_mode_enabled: "Activar lo mode demostracion ? (utilizar solament per la dem
32demo_mode_username: "Utilizaire de la demostracion" 32demo_mode_username: "Utilizaire de la demostracion"
33# share_public: Allow public url for entries 33# share_public: Allow public url for entries
34# download_images_enabled: Download images locally 34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml
index 11579745..744031e8 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml
@@ -32,3 +32,4 @@ demo_mode_enabled: "Włacz tryb demo? (używany wyłącznie dla publicznej demon
32demo_mode_username: "Użytkownik Demonstracyjny" 32demo_mode_username: "Użytkownik Demonstracyjny"
33share_public: Zezwalaj na publiczny adres url dla wpisow 33share_public: Zezwalaj na publiczny adres url dla wpisow
34# download_images_enabled: Download images locally 34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml
index 74ae5a44..1edde87a 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pt.yml
@@ -32,3 +32,4 @@ demo_mode_enabled: "Habilitar modo demo? (somente usado para o demo público do
32demo_mode_username: "Usuário demo" 32demo_mode_username: "Usuário demo"
33# share_public: Allow public url for entries 33# share_public: Allow public url for entries
34# download_images_enabled: Download images locally 34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml
index 5095dfa0..f0c935d3 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml
@@ -32,3 +32,4 @@ modify_settings: "aplică"
32# demo_mode_username: "Demo user" 32# demo_mode_username: "Demo user"
33# share_public: Allow public url for entries 33# share_public: Allow public url for entries
34# download_images_enabled: Download images locally 34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml
index cd42e595..eb40fc5e 100644
--- a/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml
+++ b/app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml
@@ -32,3 +32,4 @@
32# demo_mode_username: "Demo user" 32# demo_mode_username: "Demo user"
33# share_public: Allow public url for entries 33# share_public: Allow public url for entries
34# download_images_enabled: Download images locally 34# download_images_enabled: Download images locally
35# restricted_access: Enable authentication for websites with paywall
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist
index f821f2a8..a4dc0bde 100644
--- a/app/config/parameters.yml.dist
+++ b/app/config/parameters.yml.dist
@@ -56,3 +56,6 @@ parameters:
56 redis_port: 6379 56 redis_port: 6379
57 redis_path: null 57 redis_path: null
58 redis_password: null 58 redis_password: null
59
60 # sites credentials
61 sites_credentials: {}