mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
When private mode is turned on and off, a setting to allow anonymous editing is being written. This turns on anonymous editing on the wiki. To fix, drop the code that adds anonymous editing line and implement migration from older settings to newer settings. Closes: #1783. Tests performed: - Install mediawiki with current master. Private mode is disabled by default. Anonymous users can't edit. There is a line for editing set to false in FreedomBoxSettings.php configuration file. Switch to latest code. The line should be removed. private mode is still disabled. Anonymous users should not be able to edit the wiki. - Install mediawiki with current master. Enable private mode. Anonymous users can't edit, login is required to view wiki. There is a line for editing set to false in FreedomBoxSettings.php configuration file. Switch to latest code. The line should be removed. private mode is still enabled. Anonymous users should not be able to edit the wiki. Login is required to view the wiki. - Install mediawiki with current master. Enable private mode and disable it. Anonymous users can edit the wiki. There is a line for editing set to true in FreedomBoxSettings.php configuration file. Switch to latest code. The line should be removed. private mode is still disabled. Anonymous users should not be able to edit the wiki but they can read the wiki. - Install mediawiki with the changes in the branch. Line for editing the wiki is not present in FreedomBoxSettings.php configuration file. Enabling/disabling the private mode does not introduce the line either. When private mode is enabled, login is required to read/edit the wiki. When it is disabled, anonymous users can read the wiki but not edit it. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>