516 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
2bb694cf31
apache: Explicitly enable the latest version of PHP module
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-03-24 20:13:15 -04:00
Sunil Mohan Adapa
7b326870da
apache: Only regenerate snake oil cert when needed
Closes #1230.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-03-24 20:12:51 -04:00
Sunil Mohan Adapa
b057a57dec
ssh: Add comment about regenerating SSH keys
Closes #1230.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-03-24 20:12:10 -04:00
James Valleroy
474b363f0b
infinoted: Always check ownership of cert files in setup
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-03-12 18:49:42 +05:30
Sunil Mohan Adapa
ebabb2f8aa
sharing: Finish implementation
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-03-12 18:27:06 +05:30
Prachi
a42aed78f1
sharing: Add app to share disk folders using various protocols
- Adds the basic application framework
- Adds the sharing page for index and adding share
- Adds the action for sharing for adding and listing shares

Signed-off-by: Prachi Srivastava <prachisr@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-03-12 18:26:43 +05:30
Joseph Nuthalapati
9ab0e13ab9
snapshots: Refactoring and indentation changes
- Made updating snapshot configuration more efficient by running a single
  snapper command instead of one per configuration.
- Set default configuration for NUMBER_LIMIT only once at the time of
  installation. Snapshot version has been incremented to support this.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-03-09 13:42:54 +05:30
Joseph Nuthalapati
73bac986e4
coquelicot: Rename Plinth to FreedomBox in license headers
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-28 19:00:04 +01:00
Johannes Keyser
629e8f8364
matrixsynapse: Fix mail attribute for ldap login.
Signed-off-by: Johannes Keyser <johanneskeyser@posteo.de>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 22:38:25 +05:30
Sunil Mohan Adapa
f054703d3a
searx: Styling fixes
- Internet is used instead of 'internet' in Plinth elsewhere.

- Use common error messages instead of specific errors to reduce l10n effort.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:56:59 +05:30
Sunil Mohan Adapa
c68d76b86f
searx: Explicitly enable uwsgi service
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:56:07 +05:30
Sunil Mohan Adapa
052d8eb778
searx: Unconditionally enable proxy_uwsgi module
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:55:58 +05:30
Sunil Mohan Adapa
f10f0438df
searx: Increase the secret key length to 64 bytes
Although 32 bytes is sufficient, 64 bytes has been recommended by a few sources.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:55:51 +05:30
Joseph Nuthalapati
619c3cf79c
searx: Safe Search setting
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:55:41 +05:30
Joseph Nuthalapati
26a53e6649
searx: Allow Searx to be added as a search engine to Firefox
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:55:30 +05:30
Joseph Nuthalapati
05715b4e64
searx: Fixes for enable/disable actions
- Restarting uwsgi is required on enable and disable.
- Some refactoring to improve efficiency.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:55:20 +05:30
Joseph Nuthalapati
bffaf903b8
searx: Fix YAML parsing errors
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:55:11 +05:30
Joseph Nuthalapati
314f95d562
searx: Set page title to 'FreedomBox Web Search'
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:54:36 +05:30
Joseph Nuthalapati
3b6f4d0df3
searx: Update Apache configuration and icon
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:54:14 +05:30
Joseph Nuthalapati
67274e1566
searx: Changes from code review
- Use 32-bit key for HMAC-256
- Use secrets library instead of os.urandom
- uwsgi enable/disable along with webserver enable/disable
- Text changes

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:53:59 +05:30
Joseph Nuthalapati
823c2968f0
searx: New app for Searx metasearch engine
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:53:46 +05:30
Sunil Mohan Adapa
6bf5109108
Rename Plinth to FreedomBox in code messages
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:10:51 -05:00
Sunil Mohan Adapa
90f2117554
Rename Plinth to FreedomBox in comments
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:10:45 -05:00
Sunil Mohan Adapa
8f4811b350
Rename Plinth to FreedomBox in more module doc strings
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:10:31 -05:00
Sunil Mohan Adapa
dea4af17fb
Rename Plinth to FreedomBox in license headers
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:10:09 -05:00
Joseph Nuthalapati
ff9d061e98
Add file-sharing application Coquelicot to FreedomBox
- Add settings in Service View
- Fixes for maximum file setting
- Don't allow negative values for max. file size in UI
- Minor text changes to django messages
- Minor correction to maximum file size calculation
- Rename apache conf file to coquelicot-freedombox.conf
- Remove all hacks to adjust file size.
- Fix permissions issues for settings file
- Show status block in UI
- try-restart on settings change instead of restart

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-14 07:11:25 -05:00
Joseph Nuthalapati
d74f42749d
snapshots: Increment version to 2
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-02-12 18:04:41 +05:30
Joseph Nuthalapati
3e5057e8cd
snapshots: Refactoring and text changes
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-02-12 17:44:16 +05:30
Aakanksha Saini
ace8abe34a
Snapper: Modify configurations to reduce disk usage
Signed-off-by: Aakanksha Saini <aakanksa@thoughtworks.com>
Signed-off-by: Shubham Agarwal <shubhama@thoughtworks.com>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-02-12 17:43:06 +05:30
Joseph Nuthalapati
fe17a8e541
snapshot: Delete All should skip currently active snapshot
Delete All in case of rollbacks was failing because it cannot delete the
snapshot that's active. This has to be skipped and the remaining snapshots
deleted.

Also, the active snapshot won't be listed in the form to delete all snapshots.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-12 16:40:33 +05:30
Joseph Nuthalapati
1d1328fcd1
YAPF formatting for actions/auth_pubtkt
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-10 15:00:51 -05:00
Joseph Nuthalapati
5e20a47bf4
sso: Increase timeout to 60 minutes
This is a temporary measure since no permanent solution was found for the cases
where auth_pubtkt cookie refresh fails when an application sends POST requests
only during the time a cookie refresh must happen. e.g. transmission and tt-rss

This at least makes the above applications usable for an hour. And then the user
must refresh the application on their web browser. This does not affect the
mobile apps.

The only other option for now is to disable SSO for the above applications till
we implement a better SSO solution which is undesirable since our users are
already used to the SSO feature.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-10 15:00:23 -05:00
Sunil Mohan Adapa
9f3010e757
apache2: Don't explicitly enable php7.0 module.
Don't explicitly enable module php7.0. Rely on the package libapache2-mod-php
installing the current version of the package and enabling. This ensures that
when PHP version changes, the code is not broken.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-01-30 18:40:05 +05:30
Joseph Nuthalapati
45c23068db
matrix-synapse: Fix YAML format issues.
/etc/matrix-synapse/homeserver.yaml file has several complex cases of inline
comments which are introducing bugs when parsed with ruamel.yaml
Eliminated the problem by discarding comments altogether since the YAML data is
only read by Plinth and not by a human.

Closes #1214

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-01-30 12:30:16 +05:30
Joseph Nuthalapati
9dae13ada5
actions: test case for is-package-manager-busy command
comments, import optimization and YAPF formatting.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-01-30 10:57:58 +05:30
Sunil Mohan Adapa
1779ac8928
openvpn: yapf indentation
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-01-14 20:40:21 -05:00
Sunil Mohan Adapa
71cc0e1fb0
openvpn: Upgrade to the new Debian way
Earlier only openvpn@.service file was available. Currently, Debian is using
openvpn-server@.service and openvpn-client@.service. Start using this and
upgrade our current users to this approach. This fixes the problem with
incorrect enabling/disabling of OpenVPN app in Plinth.

Tested primarily three cases:

- Install version 2 of the app directly. Make sure daemon runs,
  enabling/disabling the app works.

- Install version 1 of the app. Disable it. Upgrade to version 2 make sure
  everything is upgraded but disabled. Enabling make the app work properly.

- Install version 1 of the app. Enable it. Upgrade to version 2 make sure
  everything is upgraded, app is enabled and running.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-01-14 20:40:04 -05:00
Joseph Nuthalpati
37138ee83b
mediawiki: Add wiki application
Installs and configures MediaWiki. SSO integration is not included yet.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-01-01 13:20:37 -05:00
James Valleroy
c7c9b200a8
bind: Remove option to enable forwarding
Forwarding is enabled by adding forwarders.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-12-31 18:42:12 +05:30
James Valleroy
3cb95fcbbd
bind: Add tests for config
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-12-31 18:41:48 +05:30
hanisha
76ffad7955
Option to enable/disble automatic timeline snapshots
Signed-off-by: Hanisha P<hanishap@thoughtworks.com>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2017-12-18 12:21:01 +05:30
Joseph Nuthalapati
3e5dcfcbf5
snapshots: Button to delete all snapshots
- closes #1144

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-14 10:04:07 -05:00
Sunil Mohan Adapa
2d17f19ae2
users: Add a note about using separate first setup action
Instead of a separate action that is conditionally called for a version number,
we can check if the domain currently configured is what we want and then based
on the value do a reconfiguration. This approach will work better when Plinth
state is reset etc.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-12-14 11:43:23 +05:30
James Valleroy
87eecb7c62
users: Handle upgrade for ldapscripts config
Increment users module version so existing users will get FreedomBox
copy of ldapscripts config file.

Avoid reconfiguration of slapd during module upgrade, because this
will move the existing database.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-12-14 11:43:07 +05:30
James Valleroy
4cbb60ccfe
users: Use own copy of ldapscripts config
Avoid modifying the conffile shipped with ldapscripts.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-12-14 11:42:51 +05:30
John McCann
cb55b87660
ejabberd: Use dynamic reload after enabling/disabling MAM
After a user enables/disables MAM, use ejabberd's reload_config instead
of restarting ejabberd.

Please let me know how this looks? Could reload_config also be of use
when adding/dropping a Let's Encrypt certificate?

Fixes #1010

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-13 08:48:16 -05:00
Joseph Nuthalapati
32b2ef38c7
Fixes for user groups
- Edit user form fails because a 'wiki' group entry exists in the database
  though the ikiwiki app hasn't been installed yet.
- Register group when a user group is created by an application, so that a
  plinth restart can be avoided.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-10 19:09:58 -05:00
Joseph Nuthalapati
7ce5d1f636
groups: User permissions for access to apps based on LDAP groups
- More user-friendly treatment of groups and their permissions

Closes #690

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-10 19:09:55 -05:00
Joseph Nuthalapati
2f67fb49d4
Add framework for user groups per application
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-10 19:09:17 -05:00
Joseph Nuthalapati
111f8f9145
sso: Fixes for regressions after adding captcha and axes
- Change sso refresh url to refresh-pubtkt since refresh was conflicting with
  captcha's image refresh url.
- Fix datetime.timedelta calculation for refresh interval. Now validity of
  ticket is 30 seconds as it was intended to be. It was wrongly set to 30 days
  earlier.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-02 17:03:07 -05:00