7 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
5c0b15d8f8
mediawiki: Mark secret strings in privileged actions
Tests:

- Run affected privileged actions through UI and notice that secret strings are
not logged.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-08-11 12:57:39 -04:00
Sunil Mohan Adapa
dd199fbfad
mediawiki: Utilize purging of packages and don't remove explicitly
- Purging mediawiki package removes /etc/mediawiki. There is no need to
explicitly remove our two configuration files from /etc/mediawiki.

Tests:

- Setup mediawiki, change public registrations setting and uninstall. Reinstall
and observe that public registrations setting is reset.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-16 11:16:20 -04:00
Sunil Mohan Adapa
cd512bd24c
mediawiki: Use drop-in config component for /etc files
- Don't ship /etc/mediawiki/FreedomBoxSettings.php anymore. Create the file on
first setup. Keep old file on update.

- Simplify and unify how the configuration settings are read and written.

Tests:

- Run unit and functional tests.

- All the drop-in config files in /etc/ are symlinks.

- Shipped configuration is effective.

- Upgrade from older version keeps old configuration.

- Config files are all symlinks in /etc/

- When upgrading from older version FreedomBoxSettings.php does not change.
  FreedomBoxStaticSettings.php becomes a symlink.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-06-05 20:29:16 -04:00
Sunil Mohan Adapa
dcd8ef9634
mediawiki: Make a utility method public
For use later.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-04-27 08:39:23 -04:00
nbenedek
50b6fd4093
mediawiki: Completely uninstall app
Tests:
1. Install Mediawiki, set the admin password and edit the main page
2. Reinstall app: password and wiki content are set back to default
3. After the reinstall, I test uploading an image and backing up/restoring the
   app

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, make uninstall fail-safe]
[sunil: Fix functional tests by setting up after re-install]
[sunil: Fix functional test by account for change in delete button ID]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-04-16 09:35:09 +05:30
nbenedek
f88f37c80e
mediawiki: Allow setting site language code
Closes: #2137

Signed-off-by: nbenedek <contact@nbenedek.me>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-03-27 20:14:34 -04:00
Sunil Mohan Adapa
f5bfd7a9db
mediawiki: Use privileged decorator for actions
Tests:

- Functional tests works (when libpam-tmpdir is removed)
- Initial setup works
  - Website is accessible
  - sqlite file is created
  - Database update is triggered
- Changing skin/admin password/public registrations/private mode/site name works
  - Configuration file is updated
  - App page shows the current value
  - Website is reflects the correct value
  - When private mode is enabled, public registrations are automatically
    disabled

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-10-08 18:52:23 -04:00