mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-17 17:08:37 +00:00
Use internal config instead for demo
This commit is contained in:
parent
d8d56448c9
commit
a4f42c59f0
9 changed files with 25 additions and 17 deletions
|
@ -25,3 +25,5 @@ modify_settings: "apply"
|
||||||
piwik_host: Host of your website in Piwik
|
piwik_host: Host of your website in Piwik
|
||||||
piwik_site_id: ID of your website in Piwik
|
piwik_site_id: ID of your website in Piwik
|
||||||
piwik_enabled: Enable Piwik
|
piwik_enabled: Enable Piwik
|
||||||
|
demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
|
||||||
|
demo_mode_username: "Demo user"
|
||||||
|
|
|
@ -25,3 +25,5 @@ modify_settings: "appliquer"
|
||||||
piwik_host: URL de votre site dans Piwik
|
piwik_host: URL de votre site dans Piwik
|
||||||
piwik_site_id: ID de votre site dans Piwik
|
piwik_site_id: ID de votre site dans Piwik
|
||||||
piwik_enabled: Activer Piwik
|
piwik_enabled: Activer Piwik
|
||||||
|
demo_mode_enabled: "Activer le mode démo ? (utiliser uniquement pour la démo publique de wallabag)"
|
||||||
|
demo_mode_username: "Utilisateur de la démo"
|
||||||
|
|
|
@ -45,7 +45,3 @@ parameters:
|
||||||
fosuser_confirmation: true
|
fosuser_confirmation: true
|
||||||
|
|
||||||
from_email: no-reply@wallabag.org
|
from_email: no-reply@wallabag.org
|
||||||
|
|
||||||
# this parameter is only used for the wallabag public demo, it means user won't be able to change the password of the demo_user account
|
|
||||||
demo: false
|
|
||||||
demo_username: wallabag
|
|
||||||
|
|
|
@ -35,7 +35,3 @@ parameters:
|
||||||
fosuser_confirmation: true
|
fosuser_confirmation: true
|
||||||
|
|
||||||
from_email: no-reply@wallabag.org
|
from_email: no-reply@wallabag.org
|
||||||
|
|
||||||
# this parameter is only used for the wallabag public demo, it means user won't be able to change the password of the demo_user account
|
|
||||||
demo: false
|
|
||||||
demo_username: wallabag
|
|
||||||
|
|
|
@ -35,7 +35,3 @@ parameters:
|
||||||
fosuser_confirmation: true
|
fosuser_confirmation: true
|
||||||
|
|
||||||
from_email: no-reply@wallabag.org
|
from_email: no-reply@wallabag.org
|
||||||
|
|
||||||
# this parameter is only used for the wallabag public demo, it means user won't be able to change the password of the demo_user account
|
|
||||||
demo: false
|
|
||||||
demo_username: wallabag
|
|
||||||
|
|
|
@ -35,7 +35,3 @@ parameters:
|
||||||
fosuser_confirmation: true
|
fosuser_confirmation: true
|
||||||
|
|
||||||
from_email: no-reply@wallabag.org
|
from_email: no-reply@wallabag.org
|
||||||
|
|
||||||
# this parameter is only used for the wallabag public demo, it means user won't be able to change the password of the demo_user account
|
|
||||||
demo: false
|
|
||||||
demo_username: wallabag
|
|
||||||
|
|
|
@ -327,6 +327,16 @@ class InstallCommand extends ContainerAwareCommand
|
||||||
'value' => '1',
|
'value' => '1',
|
||||||
'section' => 'analytics',
|
'section' => 'analytics',
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'name' => 'demo_mode_enabled',
|
||||||
|
'value' => '0',
|
||||||
|
'section' => 'misc',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'demo_mode_username',
|
||||||
|
'value' => 'wallabag',
|
||||||
|
'section' => 'misc',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($settings as $setting) {
|
foreach ($settings as $setting) {
|
||||||
|
|
|
@ -57,7 +57,7 @@ class ConfigController extends Controller
|
||||||
$pwdForm->handleRequest($request);
|
$pwdForm->handleRequest($request);
|
||||||
|
|
||||||
if ($pwdForm->isValid()) {
|
if ($pwdForm->isValid()) {
|
||||||
if ($this->getParameter('demo') === true && $this->getParameter('demo_username') === $user->getUsername()) {
|
if ($this->get('craue_config')->get('demo_mode_enabled') && $this->get('craue_config')->get('demo_mode_username') === $user->getUsername()) {
|
||||||
$this->get('session')->getFlashBag()->add(
|
$this->get('session')->getFlashBag()->add(
|
||||||
'notice',
|
'notice',
|
||||||
'In demonstration mode, you can\'t change password for this user.'
|
'In demonstration mode, you can\'t change password for this user.'
|
||||||
|
|
|
@ -125,6 +125,16 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface
|
||||||
'value' => '1',
|
'value' => '1',
|
||||||
'section' => 'analytics',
|
'section' => 'analytics',
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'name' => 'demo_mode_enabled',
|
||||||
|
'value' => '0',
|
||||||
|
'section' => 'misc',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'demo_mode_username',
|
||||||
|
'value' => 'wallabag',
|
||||||
|
'section' => 'misc',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($settings as $setting) {
|
foreach ($settings as $setting) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue