From d64bf7953b0e4e793d7f75ec50bf6e42652560b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 22 Nov 2016 14:56:53 +0100 Subject: Added internal setting to enable/disable articles with paywall --- app/DoctrineMigrations/Version20161122144743.php | 45 ++++++++++++++++++++++ .../translations/CraueConfigBundle.en.yml | 1 + 2 files changed, 46 insertions(+) create mode 100644 app/DoctrineMigrations/Version20161122144743.php (limited to 'app') 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 @@ +container = $container; + } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } + + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $this->addSql("INSERT INTO ".$this->getTable('craue_config_setting')." (name, value, section) VALUES ('restricted_access', 0, 'entry')"); + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + $this->addSql("DELETE FROM ".$this->getTable('craue_config_setting')." WHERE name = 'restricted_access';"); + } +} 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)" demo_mode_username: "Demo user" share_public: Allow public url for entries download_images_enabled: Download images locally +restricted_access: Enable authentication for websites with paywall -- cgit v1.2.3