181 Commits

Author SHA1 Message Date
James Valleroy
b185ff8e37
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-06 20:40:11 -04:00
Joseph Nuthalapati
e04ae48637
users: Add component for managing users and groups
- Handle groups needed by an app.
- Handle reserved usernames for an app.
- Updated documentation
- Updated unit tests

Tests performed:
  - Reserved usernames: ez-ipupd, ejabberd, Debian-minetest, mldonkey,
    monkeysphere, mumble-server, privoxy, quasselcore, radicale, debian-tor,
    debian-transmission
  - Reserved usernames checks should work in the following forms:
    - Create user
    - Update user
    - First boot user creation
  - Full list of available groups should appear in following cases:
    - Create user form
    - Update user form
  - Full list of groups should get created in Django DB during:
    - Update user form display
    - First boot form save
  - When updating the last admin user, the 'admin' group choice is checked
    and disabled.
  - Following groups show up (sorted by group name):
    - bit-torrent: Download files using BitTorrent applications
    - git-access: Read-write access to Git repositories
    - i2p: Manage I2P application
    - wiki: View and edit wiki applications
    - minidlna: Media streaming server
    - ed2k: Download files using eDonkey applications
    - freedombox-share: Access to the private shares
    - web-search: Search the web
    - syncthing: Administer Syncthing application
    - feed-reader: Read and subscribe to news feeds
    - admin: Access to all services and system settings
  - Directory validation form checks for write permissions for following apps:
    - deluge with debian-deluged user
    - transmission with debian-transmission user
  - Sharing app should show all the groups in add/edit share forms
  - The following apps should get added to share group during setup:
    debian-transmission
    debian-deluged
  - Unit tests pass
  - Functional tests for users and groups pass
  - Test that an app (example syncthing) provides the necessary
    permissions to users in that group (but not in admin group).

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Fix i18n of group descriptions]
[sunil: Update developer documentation]
[sunil: Separate out cosmetic changes]
[sunil: Fix component ID for mumble]
[sunil: sharing: Remove unneeded dependency on users app]
[sunil: Implement better API for getting groups in component]
[sunil: Fix incorrect regression change ttrss app]
[sunil: Make iterating over gourps more readable]
[sunil: Improve tests, drop single use fixtures]
[sunil: Simplify test_view.py fixture]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Tested-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-04 09:31:35 -04:00
Alice Kile
0b5b384651
app: Separate app enable/disable form from config form
- Introduce new API to mark an app that it can't be disabled.

- Mark jsxc, storage, config, upgrade and firewall apps as can't be disabled.

- Fixed functional tests

- Replaced AppForm with forms.Form in all modules' forms.py.

- Remove app.template.js.

- Remove unused styles.

- Remove app status checks in form_valid of Deluge, Diaspora, Matrix, Ejabberd,
MediaWiki, Storage, Transmission, Quassel

- Purge unused is_enabled context variables (Ikiwiki)

- ejabberd: Minor cleanup in template

- jsxc: Cleanup unneeded overrides

- tahoe: Cleanup unnecessary overrides

Tests performed:

- For all apps affected, test enable/disable button works and submitting
configuration form works: with changes updates message and without changes
'settings unchanged' message.
  - avahi
  - bind
  - cockpit
  - SKIP: coquelicot
  - datetime
  - deluge
  - SKIP: diaspora
  - ejabberd
  - gitweb
  - i2p
  - infinoted
  - ikiwiki
  - matrixsynapse
  - mediawiki
  - minetest
  - minidlna
  - mldonkey
  - mumble
  - pagekite
  - privoxy
  - quassel
  - radicale
  - roundcube
  - SKIP: samba
  - searx
  - SKIP: shaarli
  - shadowsocks
  - ssh
  - tahoe
  - transmission
  - FAIL: tt-rss (not installable)
  - wireguard
- Deluge test that configuration changes when app is disabled work
- Quassel test that setting the domain works when app is diabled
- Transmission test that setting the domain works when app is diabled
- Ikiwiki create form works properly
- Enable/disable button appears as expected when enabled and when disabled
- Enable/disable button works without Javascript
- Functional tests work for affected apps, Tor and OpenVPN
- AppForm is removed from developer documentation
  - Forms reference
  - Customizing tutorial
- Test all apps using directory select form
  - Transmission
  - Deluge
- Visit each template that overrides block configuration and ensure that it is
loaded properly and the display is as expected.
- All apps that use AppView that are not tested above should not have an
enable/disable button. That is JSXC, update, config, firewall, storage, users.

Signed-off-by: Alice Kile <buoyantair@protonmail.com>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-03-29 09:42:31 +03:00
Sunil Mohan Adapa
172f5f3160
debian: Separate binary packages for each language manual
- When there are multiple binary packages, a common practice is to install into
  debian/tmp using the Makefile and then use dh_install and .install files. This
  splits the contents installed into debian/tmp to various package directories
  debian/{package}.

- Install documentation in to /usr/share/freedombox instead of
  /usr/share/doc/freedombox. Then create a link to /usr/share/doc/freedombox/.
  This approach is recommended Debian Policy Manual in section 12.3[1] because
  it should safe for administrator to delete files in /usr/share/doc safely
  without breaking the application functionality. The doc-base must refer to the
  documentation in /usr/share/doc as per doc-base documentation.

Links

1) https://www.debian.org/doc/debian-policy/ch-docs.html#additional-documentation

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-03-25 17:52:22 -04:00
Sunil Mohan Adapa
7a0ea38fb1
web_server: Introduce component to handle special static file dirs
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-03-25 20:22:37 +02:00
James Valleroy
0a16f171a2
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-03-23 19:41:34 -04:00
James Valleroy
18ab9ce975
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-03-09 20:01:16 -04:00
James Valleroy
9fe17fe7ea
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-24 20:15:50 -05:00
Sunil Mohan Adapa
6c426c1f20
doc/dev: Update copyright year
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-22 15:51:51 -05:00
Sunil Mohan Adapa
22c3241a52
notification: Add developer documentation
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-22 15:51:47 -05:00
Sunil Mohan Adapa
94df52ba73
doc/dev: Allow all modules to be imported by Sphinx
Setup Django in Sphinx conf.py so that any Django models can be imported.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-22 15:51:44 -05:00
Joseph Nuthalapati
bb668e0f52
samba: Add link to manual page
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-02-21 21:57:46 +05:30
Sunil Mohan Adapa
fd210deae4
doc/dev: Update tutorial to use SPDX license indentifier
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:40:25 +02:00
Sunil Mohan Adapa
07180c2309
*: Update misc build related files to use SPDX license identifier
These files are not installed on the system and don't end up in the Debian
package. They pose not threat of causing a configuration file prompt.

Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:40:12 +02:00
Sunil Mohan Adapa
9368504da5
*.py: Use SPDX license identifier
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:38:55 +02:00
Sunil Mohan Adapa
1dd40f5c7a
doc/dev: Include information on how to edit dev documentation
This also avoid the warning "README.rst: WARNING: document isn't included in any
toctree".

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-16 18:22:14 -05:00
Sunil Mohan Adapa
b576a77c3d
app: Refactor all apps to use the Info component
- Remove the need to pass all the individual information elements to the AppView
  separately. This eliminates many issues with elements that were mistakenly not
  sent to AppView. Also reduces a lot of code duplication.

- Create App classes for power and sso for consistency.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-16 18:22:01 -05:00
Sunil Mohan Adapa
72ce23e377
app: Introduce Info component to store basic app information
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-16 18:21:53 -05:00
James Valleroy
879927a290
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-10 19:22:39 -05:00
James Valleroy
bab4f10c88
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-27 19:22:45 -05:00
James Valleroy
25aa784651
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-13 19:11:07 -05:00
James Valleroy
86ccf5b2ed
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 21:17:14 -05:00
Sunil Mohan Adapa
2ebb565c92
diagnostics: Use new component based API for all diagnostic tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:46 -05:00
Sunil Mohan Adapa
9cc3ddea2c
daemon: Implement diagnostic test for daemon component
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:38 -05:00
Sunil Mohan Adapa
0d5493dae7
apache: Implement diagnostic test for web server component
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-30 11:37:35 -05:00
James Valleroy
5a1785c806
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-16 18:38:18 -05:00
James Valleroy
8bc86e67fc
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-02 18:00:16 -05:00
Sunil Mohan Adapa
7354277e58
doc: Fix unavailability of manual images
Closes: #1688.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-14 21:32:29 +05:30
Joseph Nuthalapati
010b9cfde4
doc: dev: Add favicon to developer documentation site
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-09 17:11:25 -08:00
Joseph Nuthalapati
8225de973c
doc: dev: Fix headings
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-09 17:11:18 -08:00
Joseph Nuthalapati
bc1ab90630
doc: dev: Reduce toc depth to 2 levels to reduce noise
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-09 17:11:11 -08:00
Joseph Nuthalapati
f424c80a0a
doc: dev: Mention where to find the user manual
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Minor wording changes]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-09 17:11:04 -08:00
Joseph Nuthalapati
ad30321fac
doc: dev: Add instructions to setup developer documentation
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Package is python3-sphinx-autobuild and not python3-sphinx-autodoc]
[sunil: Add about section, reindent]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-11-09 17:10:49 -08:00
James Valleroy
6e35012b2a
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-11-04 19:15:10 -05:00
Sunil Mohan Adapa
80498919fb
doc: Add developer documentation using Sphinx
- This is completely reworked but based on /Developer page in the FreedomBox
  Manual.

- This documentation can be made available as static site on
  https://docs.freedombox.org and the /Developer page in the FreedomBox Manual
  can be dropped.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-11-02 13:51:14 -04:00
Sunil Mohan Adapa
78839173fd
doc: Fetch and add Spanish manual
This is simply:

- Add es to languages list

- mkdir doc/manual/es

- make -C doc fetch

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:25:12 -04:00
Sunil Mohan Adapa
8734d96ce9
doc: Install using makefile instead of setup.py
- Prevent unnecessary copying and shipping of .xml files.

- Run multiple jobs concurrently to speed up the process.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:25:09 -04:00
Joseph Nuthalapati
d62463247f
doc: Move English manual to manual/en directory
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Have common top level makefile for building manual]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:25:02 -04:00
Joseph Nuthalapati
f475a94581
doc: Minor cosmetic changes
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:59 -04:00
Joseph Nuthalapati
004ba5b3ea
doc: Move build scripts into separate directory
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:57 -04:00
Joseph Nuthalapati
d67412220a
doc: Remove language code from title
This code currently works only by assuming that the language code is either 2 or
5 chars long. This is not entirely correct but works for now.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:54 -04:00
Joseph Nuthalapati
46b587196f
doc: Fix Unicode issues with the manual
docbook2html generates HTML4 documents and can't handle utf-8 input. It is quite
outdated. Switch to using stylesheets from docbook-xsl package instead.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Remove intermediary file docbook.css]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:52 -04:00
Joseph Nuthalapati
853c056018
doc: Skip empty lines when piping to wget
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:49 -04:00
Joseph Nuthalapati
a036a4af5b
doc: Add directory for development documentation
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-30 19:24:46 -04:00
James Valleroy
52d718b3e6
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-21 18:48:18 -04:00
James Valleroy
3d6625333f
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-10-07 19:05:42 -04:00
James Valleroy
2745cb2a16
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-23 18:13:11 -04:00
James Valleroy
c44d4d1bd7
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-09-09 18:19:04 -04:00
James Valleroy
5bccf0c066
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-08-26 18:55:30 -04:00
Sunil Mohan Adapa
712c51c161
doc: Fetch latest manual
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-08-25 20:14:20 +05:30