aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php12
-rw-r--r--src/Wallabag/CoreBundle/Controller/ConfigController.php15
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php10
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml8
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/about.html.twig127
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Static/about.html.twig130
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php30
7 files changed, 324 insertions, 8 deletions
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index 93520f9a..84bd51fa 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -180,7 +180,7 @@ class InstallCommand extends ContainerAwareCommand
180 $this->defaultOutput->writeln('<info><comment>Step 3 of 4.</comment> Administration setup.</info>'); 180 $this->defaultOutput->writeln('<info><comment>Step 3 of 4.</comment> Administration setup.</info>');
181 181
182 $questionHelper = $this->getHelperSet()->get('question'); 182 $questionHelper = $this->getHelperSet()->get('question');
183 $question = new ConfirmationQuestion('Would you like to create a new user ? (y/N)', false); 183 $question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (y/N)', true);
184 184
185 if (!$questionHelper->ask($this->defaultInput, $this->defaultOutput, $question)) { 185 if (!$questionHelper->ask($this->defaultInput, $this->defaultOutput, $question)) {
186 return $this; 186 return $this;
@@ -327,6 +327,16 @@ class InstallCommand extends ContainerAwareCommand
327 'value' => '1', 327 'value' => '1',
328 'section' => 'analytics', 328 'section' => 'analytics',
329 ], 329 ],
330 [
331 'name' => 'demo_mode_enabled',
332 'value' => '0',
333 'section' => 'misc',
334 ],
335 [
336 'name' => 'demo_mode_username',
337 'value' => 'wallabag',
338 'section' => 'misc',
339 ],
330 ]; 340 ];
331 341
332 foreach ($settings as $setting) { 342 foreach ($settings as $setting) {
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php
index 6eb621d8..1791eac2 100644
--- a/src/Wallabag/CoreBundle/Controller/ConfigController.php
+++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php
@@ -57,13 +57,16 @@ class ConfigController extends Controller
57 $pwdForm->handleRequest($request); 57 $pwdForm->handleRequest($request);
58 58
59 if ($pwdForm->isValid()) { 59 if ($pwdForm->isValid()) {
60 $user->setPlainPassword($pwdForm->get('new_password')->getData()); 60 if ($this->get('craue_config')->get('demo_mode_enabled') && $this->get('craue_config')->get('demo_mode_username') === $user->getUsername()) {
61 $userManager->updateUser($user, true); 61 $message = 'In demonstration mode, you can\'t change password for this user.';
62 } else {
63 $message = 'Password updated';
62 64
63 $this->get('session')->getFlashBag()->add( 65 $user->setPlainPassword($pwdForm->get('new_password')->getData());
64 'notice', 66 $userManager->updateUser($user, true);
65 'Password updated' 67 }
66 ); 68
69 $this->get('session')->getFlashBag()->add('notice', $message);
67 70
68 return $this->redirect($this->generateUrl('config').'#set4'); 71 return $this->redirect($this->generateUrl('config').'#set4');
69 } 72 }
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php
index 10b60f30..1f4cafdf 100644
--- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php
+++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php
@@ -125,6 +125,16 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface
125 'value' => '1', 125 'value' => '1',
126 'section' => 'analytics', 126 'section' => 'analytics',
127 ], 127 ],
128 [
129 'name' => 'demo_mode_enabled',
130 'value' => '0',
131 'section' => 'misc',
132 ],
133 [
134 'name' => 'demo_mode_username',
135 'value' => 'wallabag',
136 'section' => 'misc',
137 ],
128 ]; 138 ];
129 139
130 foreach ($settings as $setting) { 140 foreach ($settings as $setting) {
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
index 54161646..ebb1a95a 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -149,7 +149,12 @@ via Paypal: "via Paypal"
149Take wallabag with you: "Emportez wallabag avec vous" 149Take wallabag with you: "Emportez wallabag avec vous"
150Social: "Social" 150Social: "Social"
151powered by: "propulsé par" 151powered by: "propulsé par"
152 152Contributors: "Contributeurs"
153Thank you to contributors on wallabag web application: "Merci aux contributeurs de l'application web de wallabag"
154Third-party libraries: Librairies tierces
155"Here are the list of third-party libraries used in wallabag (with their licenses):": "Voici la liste des dépendances utilisées dans wallabag (et leur license) :"
156Package: Dépendance
157License: Licence
153 158
154# Howto 159# Howto
155Form: "Formulaire" 160Form: "Formulaire"
@@ -175,6 +180,7 @@ Entry deleted: "Article supprimé"
175Tagging rule deleted: "Règle supprimée" 180Tagging rule deleted: "Règle supprimée"
176Tagging rules updated: "Règles mises à jour" 181Tagging rules updated: "Règles mises à jour"
177User "%username%" added: 'Utilisateur "%username%" ajouté' 182User "%username%" added: 'Utilisateur "%username%" ajouté'
183In demonstration mode, you can't change password for this user.: 'En démo, vous ne pouvez pas changer le mot de passe de cet utilisateur.'
178 184
179# Entry 185# Entry
180Mark as read: 'Marquer comme lu' 186Mark as read: 'Marquer comme lu'
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/about.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/about.html.twig
index 38f08da6..fdd12cf7 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/about.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/about.html.twig
@@ -42,4 +42,131 @@
42 <dd>by contributing to the project: <a href="https://github.com/wallabag/wallabag/issues/1254">an issue lists all our needs</a></dd> 42 <dd>by contributing to the project: <a href="https://github.com/wallabag/wallabag/issues/1254">an issue lists all our needs</a></dd>
43 <dd><a href="{{ paypal_url }}">{% trans %}via Paypal{% endtrans %}</a></dd> 43 <dd><a href="{{ paypal_url }}">{% trans %}via Paypal{% endtrans %}</a></dd>
44 </dl> 44 </dl>
45
46 <h2>{% trans %}Contributors{% endtrans %}</h2>
47 <p><a href="https://github.com/wallabag/wallabag/graphs/contributors">{% trans %}Thank you to contributors on wallabag web application{% endtrans %}</a></p>
48
49 <h2>{% trans %}Third-party libraries{% endtrans %}</h2>
50 <p>{% trans %}Here are the list of third-party libraries used in wallabag (with their licenses):{% endtrans %}</p>
51 <table>
52 <tr>
53 <th>{% trans %}Package{% endtrans %}</th>
54 <th>{% trans %}License{% endtrans %}</th>
55 </tr>
56 <tr><td>behat/transliterator</td><td>Artistic 1.0</td></tr>
57 <tr><td>CraueConfigBundle</td><td>MIT</td></tr>
58 <tr><td>doctrine/annotations</td><td>MIT</td></tr>
59 <tr><td>doctrine/cache</td><td>MIT</td></tr>
60 <tr><td>doctrine/collections</td><td>MIT</td></tr>
61 <tr><td>doctrine/common</td><td>MIT</td></tr>
62 <tr><td>doctrine/dbal</td><td>MIT</td></tr>
63 <tr><td>doctrine/doctrine-bundle</td><td>MIT</td></tr>
64 <tr><td>doctrine/doctrine-cache-bundle</td><td>MIT</td></tr>
65 <tr><td>doctrine/doctrine-migrations-bundle</td><td>MIT</td></tr>
66 <tr><td>doctrine/inflector</td><td>MIT</td></tr>
67 <tr><td>doctrine/instantiator</td><td>MIT</td></tr>
68 <tr><td>doctrine/lexer</td><td>MIT</td></tr>
69 <tr><td>doctrine/migrations</td><td>LGPL-2.1</td></tr>
70 <tr><td>doctrine/orm</td><td>MIT</td></tr>
71 <tr><td>ezyang/htmlpurifier</td><td>LGPL</td></tr>
72 <tr><td>friendsofsymfony/oauth-server-bundle</td><td>MIT</td></tr>
73 <tr><td>friendsofsymfony/oauth2-php</td><td>MIT</td></tr>
74 <tr><td>friendsofsymfony/rest-bundle</td><td>MIT</td></tr>
75 <tr><td>friendsofsymfony/user-bundle</td><td>MIT</td></tr>
76 <tr><td>gedmo/doctrine-extensions</td><td>MIT</td></tr>
77 <tr><td>grandt/binstring</td><td>LGPL-2.1</td></tr>
78 <tr><td>grandt/phpepub</td><td>LGPL-2.1</td></tr>
79 <tr><td>grandt/phpresizegif</td><td>LGPL-2.1</td></tr>
80 <tr><td>grandt/phpzipmerge</td><td>LGPL-2.1</td></tr>
81 <tr><td>grandt/relativepath</td><td>LGPL-2.1</td></tr>
82 <tr><td>guzzlehttp/guzzle</td><td>MIT</td></tr>
83 <tr><td>guzzlehttp/ringphp</td><td>MIT</td></tr>
84 <tr><td>guzzlehttp/streams</td><td>MIT</td></tr>
85 <tr><td>hoa/compiler</td><td>BSD-3-Clause</td></tr>
86 <tr><td>hoa/consistency</td><td>BSD-3-Clause</td></tr>
87 <tr><td>hoa/event</td><td>BSD-3-Clause</td></tr>
88 <tr><td>hoa/exception</td><td>BSD-3-Clause</td></tr>
89 <tr><td>hoa/file</td><td>BSD-3-Clause</td></tr>
90 <tr><td>hoa/iterator</td><td>BSD-3-Clause</td></tr>
91 <tr><td>hoa/math</td><td>BSD-3-Clause</td></tr>
92 <tr><td>hoa/protocol</td><td>BSD-3-Clause</td></tr>
93 <tr><td>hoa/regex</td><td>BSD-3-Clause</td></tr>
94 <tr><td>hoa/ruler</td><td>BSD-3-Clausev
95 <tr><td>hoa/stream</td><td>BSD-3-Clause</td></tr>
96 <tr><td>hoa/ustring</td><td>BSD-3-Clause</td></tr>
97 <tr><td>hoa/visitor</td><td>BSD-3-Clause</td></tr>
98 <tr><td>hoa/zformat</td><td>BSD-3-Clause</td></tr>
99 <tr><td>htmlawed/htmlawed</td><td>GPL-2.0+ or LGPL-3.0</td></tr>
100 <tr><td>incenteev/composer-parameter-handler</td><td>MIT</td></tr>
101 <tr><td>j0k3r/graby</td><td>AGPL-3.0</td></tr>
102 <tr><td>j0k3r/graby-site-config</td><td>AGPL-3.0</td></tr>
103 <tr><td>j0k3r/php-readability</td><td>Apache-2.0</td></tr>
104 <tr><td>j0k3r/safecurl</td><td>MIT</td></tr>
105 <tr><td>jdorn/sql-formatter</td><td>MIT</td></tr>
106 <tr><td>jms/metadata</td><td>Apache</td></tr>
107 <tr><td>jms/parser-lib</td><td>Apache2</td></tr>
108 <tr><td>jms/serializer</td><td>Apache2</td></tr>
109 <tr><td>jms/serializer-bundle</td><td>Apache2</td></tr>
110 <tr><td>kphoen/rulerz</td><td>MIT</td></tr>
111 <tr><td>kphoen/rulerz-bundle</td><td>MIT</td></tr>
112 <tr><td>kriswallsmith/assetic</td><td>MIT</td></tr>
113 <tr><td>lexik/form-filter-bundle</td><td>MIT</td></tr>
114 <tr><td>liip/theme-bundle</td><td>MIT</td></tr>
115 <tr><td>mgargano/simplehtmldom</td><td>MIT</td></tr>
116 <tr><td>michelf/php-markdown</td><td>BSD-3-Clause</td></tr>
117 <tr><td>monolog/monolog</td><td>MIT</td></tr>
118 <tr><td>neitanod/forceutf8</td><td>BSD-3-Clause</td></tr>
119 <tr><td>nelmio/api-doc-bundle</td><td>MIT</td></tr>
120 <tr><td>nelmio/cors-bundle</td><td>MIT</td></tr>
121 <tr><td>ocramius/proxy-manager</td><td>MIT</td></tr>
122 <tr><td>pagerfanta/pagerfanta</td><td>MIT</td></tr>
123 <tr><td>paragonie/random_compat</td><td>MIT</td></tr>
124 <tr><td>phpcollection/phpcollection</td><td>Apache2</td></tr>
125 <tr><td>phpoption/phpoption</td><td>Apache2</td></tr>
126 <tr><td>phpzip/phpzip</td><td>LGPL-2.1</td></tr>
127 <tr><td>psr/log</td><td>MIT</td></tr>
128 <tr><td>react/promise</td><td>MIT</td></tr>
129 <tr><td>scheb/two-factor-bundle</td><td>MIT</td></tr>
130 <tr><td>sensio/distribution-bundle</td><td>MIT</td></tr>
131 <tr><td>sensio/framework-extra-bundle</td><td>MIT</td></tr>
132 <tr><td>sensiolabs/security-checker</td><td>MIT</td></tr>
133 <tr><td>simplepie/simplepie</td><td>BSD-3-Clause</td></tr>
134 <tr><td>smalot/pdfparser</td><td>GPL-3.0</td></tr>
135 <tr><td>sonata-project/google-authenticator</td><td>MIT</td></tr>
136 <tr><td>stof/doctrine-extensions-bundle</td><td>MIT</td></tr>
137 <tr><td>swiftmailer/swiftmailer</td><td>MIT</td></tr>
138 <tr><td>symfony/assetic-bundle</td><td>MIT</td></tr>
139 <tr><td>symfony/monolog-bundle</td><td>MIT</td></tr>
140 <tr><td>All of Symfony</td><td>MIT-licenced</td></tr>
141 <tr><td>tecnickcom/tcpdf</td><td>LGPLv3</td></tr>
142 <tr><td>twig/extensions</td><td>MIT</td></tr>
143 <tr><td>twig/twig</td><td>BSD-3-Clause</td></tr>
144 <tr><td>wallabag/php-mobi</td><td>Apache-2.0</td></tr>
145 <tr><td>willdurand/hateoas</td><td>MIT</td></tr>
146 <tr><td>willdurand/hateoas-bundle</td><td>MIT</td></tr>
147 <tr><td>willdurand/jsonp-callback-validator</td><td>MIT</td></tr>
148 <tr><td>willdurand/negotiation</td><td>MIT</td></tr>
149 <tr><td>zendframework/zend-code</td><td>BSD-3-Clause</td></tr>
150 <tr><td>zendframework/zend-eventmanager</td><td>BSD-3-Clause</td></tr>
151 <tr><td>doctrine/data-fixtures</td><td>MIT</td></tr>
152 <tr><td>doctrine/doctrine-fixtures-bundle</td><td>MIT</td></tr>
153 <tr><td>phpdocumentor/reflection-docblock</td><td>MIT</td></tr>
154 <tr><td>phpspec/prophecy</td><td>MIT</td></tr>
155 <tr><td>phpunit/php-code-coverage</td><td>BSD-3-Clause</td></tr>
156 <tr><td>phpunit/php-file-iterator</td><td>BSD-3-Clause</td></tr>
157 <tr><td>phpunit/php-text-template</td><td>BSD-3-Clause</td></tr>
158 <tr><td>phpunit/php-timer</td><td>BSD-3-Clause</td></tr>
159 <tr><td>phpunit/php-token-stream</td><td>BSD-3-Clause</td></tr>
160 <tr><td>phpunit/phpunit</td><td>BSD-3-Clause</td></tr>
161 <tr><td>phpunit/phpunit-mock-objects</td><td>BSD-3-Clause</td></tr>
162 <tr><td>sebastian/comparator</td><td>BSD-3-Clause</td></tr>
163 <tr><td>sebastian/diff</td><td>BSD-3-Clause</td></tr>
164 <tr><td>sebastian/environment</td><td>BSD-3-Clause</td></tr>
165 <tr><td>sebastian/exporter</td><td>BSD-3-Clause</td></tr>
166 <tr><td>sebastian/global-state</td><td>BSD-3-Clause</td></tr>
167 <tr><td>sebastian/recursion-context</td><td>BSD-3-Clause</td></tr>
168 <tr><td>sebastian/version</td><td>BSD-3-Clause</td></tr>
169 <tr><td>sensio/generator-bundle</td><td>MIT</td></tr>
170 <tr><td>symfony/phpunit-bridge</td><td>MIT</td></tr>
171 </table>
45{% endblock %} 172{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/about.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/about.html.twig
index d6b8e28a..1368bb09 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/about.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/about.html.twig
@@ -14,6 +14,8 @@
14 <li class="tab col s3"><a class="active" href="#set1">{% trans %}Who is behind wallabag{% endtrans %}</a></li> 14 <li class="tab col s3"><a class="active" href="#set1">{% trans %}Who is behind wallabag{% endtrans %}</a></li>
15 <li class="tab col s3"><a href="#set2">{% trans %}Getting help{% endtrans %}</a></li> 15 <li class="tab col s3"><a href="#set2">{% trans %}Getting help{% endtrans %}</a></li>
16 <li class="tab col s3"><a href="#set3">{% trans %}Helping wallabag{% endtrans %}</a></li> 16 <li class="tab col s3"><a href="#set3">{% trans %}Helping wallabag{% endtrans %}</a></li>
17 <li class="tab col s3"><a href="#set4">{% trans %}Contributors{% endtrans %}</a></li>
18 <li class="tab col s3"><a href="#set5">{% trans %}Third-party libraries{% endtrans %}</a></li>
17 </ul> 19 </ul>
18 </div> 20 </div>
19 21
@@ -49,6 +51,134 @@
49 </dl> 51 </dl>
50 </div> 52 </div>
51 53
54 <div id="set4" class="col s12">
55 <p><a href="https://github.com/wallabag/wallabag/graphs/contributors">{% trans %}Thank you to contributors on wallabag web application{% endtrans %}</a></p>
56 </div>
57
58 <div id="set5" class="col s12">
59 <p>{% trans %}Here are the list of third-party libraries used in wallabag (with their licenses):{% endtrans %}</p>
60 <table>
61 <tr>
62 <th>{% trans %}Package{% endtrans %}</th>
63 <th>{% trans %}License{% endtrans %}</th>
64 </tr>
65 <tr><td>behat/transliterator</td><td>Artistic 1.0</td></tr>
66 <tr><td>CraueConfigBundle</td><td>MIT</td></tr>
67 <tr><td>doctrine/annotations</td><td>MIT</td></tr>
68 <tr><td>doctrine/cache</td><td>MIT</td></tr>
69 <tr><td>doctrine/collections</td><td>MIT</td></tr>
70 <tr><td>doctrine/common</td><td>MIT</td></tr>
71 <tr><td>doctrine/dbal</td><td>MIT</td></tr>
72 <tr><td>doctrine/doctrine-bundle</td><td>MIT</td></tr>
73 <tr><td>doctrine/doctrine-cache-bundle</td><td>MIT</td></tr>
74 <tr><td>doctrine/doctrine-migrations-bundle</td><td>MIT</td></tr>
75 <tr><td>doctrine/inflector</td><td>MIT</td></tr>
76 <tr><td>doctrine/instantiator</td><td>MIT</td></tr>
77 <tr><td>doctrine/lexer</td><td>MIT</td></tr>
78 <tr><td>doctrine/migrations</td><td>LGPL-2.1</td></tr>
79 <tr><td>doctrine/orm</td><td>MIT</td></tr>
80 <tr><td>ezyang/htmlpurifier</td><td>LGPL</td></tr>
81 <tr><td>friendsofsymfony/oauth-server-bundle</td><td>MIT</td></tr>
82 <tr><td>friendsofsymfony/oauth2-php</td><td>MIT</td></tr>
83 <tr><td>friendsofsymfony/rest-bundle</td><td>MIT</td></tr>
84 <tr><td>friendsofsymfony/user-bundle</td><td>MIT</td></tr>
85 <tr><td>gedmo/doctrine-extensions</td><td>MIT</td></tr>
86 <tr><td>grandt/binstring</td><td>LGPL-2.1</td></tr>
87 <tr><td>grandt/phpepub</td><td>LGPL-2.1</td></tr>
88 <tr><td>grandt/phpresizegif</td><td>LGPL-2.1</td></tr>
89 <tr><td>grandt/phpzipmerge</td><td>LGPL-2.1</td></tr>
90 <tr><td>grandt/relativepath</td><td>LGPL-2.1</td></tr>
91 <tr><td>guzzlehttp/guzzle</td><td>MIT</td></tr>
92 <tr><td>guzzlehttp/ringphp</td><td>MIT</td></tr>
93 <tr><td>guzzlehttp/streams</td><td>MIT</td></tr>
94 <tr><td>hoa/compiler</td><td>BSD-3-Clause</td></tr>
95 <tr><td>hoa/consistency</td><td>BSD-3-Clause</td></tr>
96 <tr><td>hoa/event</td><td>BSD-3-Clause</td></tr>
97 <tr><td>hoa/exception</td><td>BSD-3-Clause</td></tr>
98 <tr><td>hoa/file</td><td>BSD-3-Clause</td></tr>
99 <tr><td>hoa/iterator</td><td>BSD-3-Clause</td></tr>
100 <tr><td>hoa/math</td><td>BSD-3-Clause</td></tr>
101 <tr><td>hoa/protocol</td><td>BSD-3-Clause</td></tr>
102 <tr><td>hoa/regex</td><td>BSD-3-Clause</td></tr>
103 <tr><td>hoa/ruler</td><td>BSD-3-Clausev
104 <tr><td>hoa/stream</td><td>BSD-3-Clause</td></tr>
105 <tr><td>hoa/ustring</td><td>BSD-3-Clause</td></tr>
106 <tr><td>hoa/visitor</td><td>BSD-3-Clause</td></tr>
107 <tr><td>hoa/zformat</td><td>BSD-3-Clause</td></tr>
108 <tr><td>htmlawed/htmlawed</td><td>GPL-2.0+ or LGPL-3.0</td></tr>
109 <tr><td>incenteev/composer-parameter-handler</td><td>MIT</td></tr>
110 <tr><td>j0k3r/graby</td><td>AGPL-3.0</td></tr>
111 <tr><td>j0k3r/graby-site-config</td><td>AGPL-3.0</td></tr>
112 <tr><td>j0k3r/php-readability</td><td>Apache-2.0</td></tr>
113 <tr><td>j0k3r/safecurl</td><td>MIT</td></tr>
114 <tr><td>jdorn/sql-formatter</td><td>MIT</td></tr>
115 <tr><td>jms/metadata</td><td>Apache</td></tr>
116 <tr><td>jms/parser-lib</td><td>Apache2</td></tr>
117 <tr><td>jms/serializer</td><td>Apache2</td></tr>
118 <tr><td>jms/serializer-bundle</td><td>Apache2</td></tr>
119 <tr><td>kphoen/rulerz</td><td>MIT</td></tr>
120 <tr><td>kphoen/rulerz-bundle</td><td>MIT</td></tr>
121 <tr><td>kriswallsmith/assetic</td><td>MIT</td></tr>
122 <tr><td>lexik/form-filter-bundle</td><td>MIT</td></tr>
123 <tr><td>liip/theme-bundle</td><td>MIT</td></tr>
124 <tr><td>mgargano/simplehtmldom</td><td>MIT</td></tr>
125 <tr><td>michelf/php-markdown</td><td>BSD-3-Clause</td></tr>
126 <tr><td>monolog/monolog</td><td>MIT</td></tr>
127 <tr><td>neitanod/forceutf8</td><td>BSD-3-Clause</td></tr>
128 <tr><td>nelmio/api-doc-bundle</td><td>MIT</td></tr>
129 <tr><td>nelmio/cors-bundle</td><td>MIT</td></tr>
130 <tr><td>ocramius/proxy-manager</td><td>MIT</td></tr>
131 <tr><td>pagerfanta/pagerfanta</td><td>MIT</td></tr>
132 <tr><td>paragonie/random_compat</td><td>MIT</td></tr>
133 <tr><td>phpcollection/phpcollection</td><td>Apache2</td></tr>
134 <tr><td>phpoption/phpoption</td><td>Apache2</td></tr>
135 <tr><td>phpzip/phpzip</td><td>LGPL-2.1</td></tr>
136 <tr><td>psr/log</td><td>MIT</td></tr>
137 <tr><td>react/promise</td><td>MIT</td></tr>
138 <tr><td>scheb/two-factor-bundle</td><td>MIT</td></tr>
139 <tr><td>sensio/distribution-bundle</td><td>MIT</td></tr>
140 <tr><td>sensio/framework-extra-bundle</td><td>MIT</td></tr>
141 <tr><td>sensiolabs/security-checker</td><td>MIT</td></tr>
142 <tr><td>simplepie/simplepie</td><td>BSD-3-Clause</td></tr>
143 <tr><td>smalot/pdfparser</td><td>GPL-3.0</td></tr>
144 <tr><td>sonata-project/google-authenticator</td><td>MIT</td></tr>
145 <tr><td>stof/doctrine-extensions-bundle</td><td>MIT</td></tr>
146 <tr><td>swiftmailer/swiftmailer</td><td>MIT</td></tr>
147 <tr><td>symfony/assetic-bundle</td><td>MIT</td></tr>
148 <tr><td>symfony/monolog-bundle</td><td>MIT</td></tr>
149 <tr><td>All of Symfony</td><td>MIT-licenced</td></tr>
150 <tr><td>tecnickcom/tcpdf</td><td>LGPLv3</td></tr>
151 <tr><td>twig/extensions</td><td>MIT</td></tr>
152 <tr><td>twig/twig</td><td>BSD-3-Clause</td></tr>
153 <tr><td>wallabag/php-mobi</td><td>Apache-2.0</td></tr>
154 <tr><td>willdurand/hateoas</td><td>MIT</td></tr>
155 <tr><td>willdurand/hateoas-bundle</td><td>MIT</td></tr>
156 <tr><td>willdurand/jsonp-callback-validator</td><td>MIT</td></tr>
157 <tr><td>willdurand/negotiation</td><td>MIT</td></tr>
158 <tr><td>zendframework/zend-code</td><td>BSD-3-Clause</td></tr>
159 <tr><td>zendframework/zend-eventmanager</td><td>BSD-3-Clause</td></tr>
160 <tr><td>doctrine/data-fixtures</td><td>MIT</td></tr>
161 <tr><td>doctrine/doctrine-fixtures-bundle</td><td>MIT</td></tr>
162 <tr><td>phpdocumentor/reflection-docblock</td><td>MIT</td></tr>
163 <tr><td>phpspec/prophecy</td><td>MIT</td></tr>
164 <tr><td>phpunit/php-code-coverage</td><td>BSD-3-Clause</td></tr>
165 <tr><td>phpunit/php-file-iterator</td><td>BSD-3-Clause</td></tr>
166 <tr><td>phpunit/php-text-template</td><td>BSD-3-Clause</td></tr>
167 <tr><td>phpunit/php-timer</td><td>BSD-3-Clause</td></tr>
168 <tr><td>phpunit/php-token-stream</td><td>BSD-3-Clause</td></tr>
169 <tr><td>phpunit/phpunit</td><td>BSD-3-Clause</td></tr>
170 <tr><td>phpunit/phpunit-mock-objects</td><td>BSD-3-Clause</td></tr>
171 <tr><td>sebastian/comparator</td><td>BSD-3-Clause</td></tr>
172 <tr><td>sebastian/diff</td><td>BSD-3-Clause</td></tr>
173 <tr><td>sebastian/environment</td><td>BSD-3-Clause</td></tr>
174 <tr><td>sebastian/exporter</td><td>BSD-3-Clause</td></tr>
175 <tr><td>sebastian/global-state</td><td>BSD-3-Clause</td></tr>
176 <tr><td>sebastian/recursion-context</td><td>BSD-3-Clause</td></tr>
177 <tr><td>sebastian/version</td><td>BSD-3-Clause</td></tr>
178 <tr><td>sensio/generator-bundle</td><td>MIT</td></tr>
179 <tr><td>symfony/phpunit-bridge</td><td>MIT</td></tr>
180 </table>
181 </div>
52 </div> 182 </div>
53 183
54 </div> 184 </div>
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
index 6c370a2d..2af93ffe 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
@@ -577,4 +577,34 @@ class ConfigControllerTest extends WallabagCoreTestCase
577 $this->assertEquals(403, $client->getResponse()->getStatusCode()); 577 $this->assertEquals(403, $client->getResponse()->getStatusCode());
578 $this->assertContains('You can not access this tagging ryle', $client->getResponse()->getContent()); 578 $this->assertContains('You can not access this tagging ryle', $client->getResponse()->getContent());
579 } 579 }
580
581 public function testDemoMode()
582 {
583 $this->logInAs('admin');
584 $client = $this->getClient();
585
586 $config = $client->getContainer()->get('craue_config');
587 $config->set('demo_mode_enabled', 1);
588 $config->set('demo_mode_username', 'admin');
589
590 $crawler = $client->request('GET', '/config');
591
592 $this->assertEquals(200, $client->getResponse()->getStatusCode());
593
594 $form = $crawler->filter('button[id=change_passwd_save]')->form();
595
596 $data = array(
597 'change_passwd[old_password]' => 'mypassword',
598 'change_passwd[new_password][first]' => 'mypassword',
599 'change_passwd[new_password][second]' => 'mypassword',
600 );
601
602 $client->submit($form, $data);
603
604 $this->assertEquals(302, $client->getResponse()->getStatusCode());
605 $this->assertContains('In demonstration mode, you can\'t change password for this user.', $client->getContainer()->get('session')->getFlashBag()->get('notice')[0]);
606
607 $config->set('demo_mode_enabled', 0);
608 $config->set('demo_mode_username', 'wallabag');
609 }
580} 610}