9242 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
89bce7a344
app: Add tags to menu and frontpage components
- Add typing information for init methods Info, Shortcut, and Menu to easily
  identify problems.

- Update docstrings for these components.

- Updates test cases to deal with tags instead of short description.

- Update custom shortcuts code to read tags and ignore short description.

- Update API to send tags instead of custom shortcuts.

- OpenVPN special treatment of info.description in Shortcut

Tests:

- All unit tests pass and type checking succeeds.

- All apps show icons with tags in apps and system section.

- In help section cards don't show tags.

- In front page, enabled apps show shortcuts with tags.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-01-09 21:08:10 +05:30
Sunil Mohan Adapa
196a2deb6f
app: Allow apps to instantiate without Django initialization
- When tags are added to Menu and Shortcut components, we will need to access
info.tags which tries to extract the original string from lazy proxy. This
requires Django initialized. When privileged process tries to initialize the app
without initializing Django, this leads to an error. Fix this by extracing the
original string from a lazy proxy a hacky way.

Tests:

- Running diagnostics does not show errors with Django initialization in checks
for configuration links.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-01-09 21:07:59 +05:30
Sunil Mohan Adapa
67cef398e1
miniflux: Ignore an type check error with pexpect library
- Even though pexpect is set for override in pyproject.toml latest
mypy==1.13.0-2 on Debian testing throws an error here.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-01-09 21:07:43 +05:30
Dietmar
a62e66daec
Translated using Weblate (German)
Currently translated at 99.1% (1772 of 1788 strings)
2025-01-09 08:38:19 +01:00
Veiko Aasa
fbd6adeac1
deluge: tests: functional: Fix deluge client logged in detection
Tests:
 - All deluge functional tests pass and monitored that there are no
 unreasonable delays in deluge web client while tests are running.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-01-07 18:40:48 +05:30
Sunil Mohan Adapa
78cba1e217
ui: Don't place JS file at the bottom of the page
- They should only be present in the <head>. Since all files are loaded with
'defer' attribute, it is no longer needed to place the JS files at the bottom of
the page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-07 12:09:01 +02:00
Sunil Mohan Adapa
c45bdf56dd
ui: js: Load all JS files in deferred mode to speed up page load
- This improves page rendering time. If JS files are not loaded in deferred or
async mode, they will halt the page rendering until JS files are loaded from
network.

- 'defer' mode guarantees that the load order is same as the order in which JS
files appeared in the HTML page.

Tests:

- Run at least one function of each affected JS file and ensure that is works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-07 12:08:51 +02:00
Sunil Mohan Adapa
ddd2d5b4a3
ui: Drop remnants of already removed background images
- Due to their fixed widths they were causing the drop down navigation bar to
placed incorrectly in mobile view.

Tests:

- In mobile view in home, apps, system, and help pages the navbar dropdown
button is placed correctly.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-07 11:46:24 +02:00
Sunil Mohan Adapa
2f0ec1a1cd
web_framework: Disable caching templates files in development mode
- When a template page is updated, we are having to restart service in order for
the new changes to reflect. This is due to caching of template files starting
Django 4.1[1]. Disable this behavior in development mode to allow reload the
browser page to see changes reflected.

Links:

https://docs.djangoproject.com/en/5.0/releases/4.1/#templates

Tests:

- Change a template file and reload the page without restarting service. The
changes should reflect immediately.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-07 11:45:57 +02:00
Sunil Mohan Adapa
9b8b0cd254
ui: Fix missing variables in Bootstrap 5.2/Debian stable
- Most notable of the problems is the missing hover color on cards.

Tests:

- Cards have a gray hover color.

- Forms with errors have input boxes with red borders and help text with red
color.

- Select all button in created backup has a border.

- UI is consistent across stable and testing for tested cases.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-07 11:40:19 +02:00
Sunil Mohan Adapa
f568d75539
ui: Update section header style to increase size, remove underline
- Currently, there is a bug with section header with Bootstrap 5 migration in
stable. It causes the section headers not to have underline in Debian stable but
only in Debian testing. This is due to the variable --bs-secondar-border-subtle
being defined only in Bootstrap 5.3 (testing) but not in Bootstrap 5.2 (stable).

- The removal of the border is actually reducing visual noise. So, commit to it
by removing the border even on testing. To Increase contrast to the section
headers, increase their font size (but reduce font weight).

Tests:

- In testing and stable VMs, the style is same and as expected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-07 11:40:19 +02:00
gfbdrgng
dba6c1f4a9
Translated using Weblate (Russian)
Currently translated at 97.8% (1750 of 1788 strings)
2025-01-07 08:01:33 +00:00
gfbdrgng
12c240803f
Translated using Weblate (Russian)
Currently translated at 96.8% (1732 of 1788 strings)
2025-01-06 08:11:07 +01:00
James Valleroy
6f1d97e009
Release v24.26.1 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v24.26.1
2025-01-05 12:17:24 -05:00
James Valleroy
3911ae2c60
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2025-01-05 12:16:47 -05:00
Coucouf
53de20d99d
Translated using Weblate (French)
Currently translated at 100.0% (1788 of 1788 strings)
2025-01-05 17:52:59 +01:00
Sunil Mohan Adapa
f2ce5b7afd
users: Drop jQuery code as the library dependency has been removed
Closes: #2484

Tests:

- Functional tests for users app works.

- When updating the user if the delete user is not checked, delete confirmation
dialog is not shown.

- When updating the user if the delete user is checked, delete confirmation
dialog is shown. It can be dismissed and re-shown many times. When confirm
button is clicked, the form is submitted and user is deleted.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-01-05 09:51:39 -05:00
Sunil Mohan Adapa
79482f7a38
sharing: Drop jQuery code as the library dependency has been removed
Tests:

- Enabling/disabling public share shows and hides the list of groups in share
edit page.

- When loading the share page, if public share is enabled, list of groups is
hidden.

- When loading the share page, if public share is disabled, list of groups is
shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-01-05 09:51:37 -05:00
109247019824
5fc48e684b
Translated using Weblate (Bulgarian)
Currently translated at 54.6% (977 of 1788 strings)
2025-01-03 23:02:29 +01:00
James Valleroy
79999a9090
mumble: Add diagnostic for setup config changes
Tests:

- Modify or remove the sslCert/sslKey lines in mumble-server.ini. The
  diagnostic is failed. After repair, the expected lines are restored,
  and the diagnostic is passed.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-01-02 16:18:23 -08:00
James Valleroy
2274711c19
mumble: Support config file moved into /etc/mumble
Tests:

- In testing container, install Mumble. /etc/mumble/mumble-server.ini
  has settings for ssl cert and key.

- In stable container, install Mumble. /etc/mumble-server.ini has
  settings for ssl cert and key.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-01-02 16:18:13 -08:00
Benedek Nagy
69a18565ea
email: Fix DKIM signing by setting correct ownership on private keys
See the spam score for an email sent with these settings:
https://www.mail-tester.com/test-jy6unbdzu

Tests done:

1. Install the email app with version 4, then check out the files:

```
ls -la /var/lib/rspamd/dkim/ ; cat /etc/rspamd/local.d/dkim_signing.conf
total 4
dr-x------ 1 _rspamd _rspamd    50 Jan  1 19:14 .
drwxr-x--- 1 _rspamd _rspamd 16936 Jan  1 20:21 ..
-r-------- 1 root    root     1704 Jan  1 19:14 freedombox.local.dkim.key
cat: /etc/rspamd/local.d/dkim_signing.conf: No such file or directory
```

2. Apply the patches and update the app:

```
ls -la /var/lib/rspamd/dkim/ ; cat /etc/rspamd/local.d/dkim_signing.conf
total 4
dr-x------ 1 _rspamd _rspamd    50 Jan  1 19:14 .
drwxr-x--- 1 _rspamd _rspamd 16936 Jan  1 20:22 ..
-r-------- 1 _rspamd _rspamd  1704 Jan  1 19:14 freedombox.local.dkim.key
allow_username_mismatch = true;
sign_authenticated = true;
use_domain = "header";
domain {
    freedombox.local {
        path = "/var/lib/rspamd/dkim/freedombox.local.dkim.key";
        selector = "dkim";
    }
}
```

3. Configure example.com as a domain under Name Services, then also change the primary domain in the email app and confirm it completes without errors.
Also see:

```
ls -la /var/lib/rspamd/dkim/ ; cat /etc/rspamd/local.d/dkim_signing.conf
total 8
dr-x------ 1 _rspamd _rspamd    90 Jan  1 21:15 .
drwxr-x--- 1 _rspamd _rspamd 16936 Jan  1 21:17 ..
-r-------- 1 _rspamd _rspamd  1704 Jan  1 21:15 example.com.dkim.key
-r-------- 1 _rspamd _rspamd  1704 Jan  1 19:14 freedombox.local.dkim.key
allow_username_mismatch = true;
sign_authenticated = true;
use_domain = "header";
domain {
    example.com {
        path = "/var/lib/rspamd/dkim/example.com.dkim.key";
        selector = "dkim";
    }
}
```

4. Uninstall the app and perform a fresh install, confirm it completes succesfully.

The configurations in /etc/rspamd/local.d/dkim_signing.conf have been
verified to work on a throw-away VPS setup.
Once merged, this should be mentioned here: https://discuss.freedombox.org/t/solved-email-messages-not-signed-with-dkim/2387

Signed-off-by: Benedek Nagy <contact@nbenedek.me>
[sunil: Add comment explaining allow_username_mismatch option]
[sunil: Drop an unused variable, added docstrings]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-01-02 15:40:14 -08:00
109247019824
3011a59a84
Translated using Weblate (Bulgarian)
Currently translated at 54.0% (967 of 1788 strings)
2025-01-02 09:00:45 +00:00
Jiří Podhorecký
4daa67a225
Translated using Weblate (Czech)
Currently translated at 100.0% (1788 of 1788 strings)
2025-01-02 09:00:44 +00:00
Benedek Nagy
e510118453
nextcloud: remove experimental warning
The last confirmed issue we had was fixed in Nov 2024, no new issues
have been repoerted since.

Signed-off-by: Benedek Nagy <contact@nbenedek.me>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-01-01 19:35:07 -08:00
Besnik Bleta
befd35c86e
Translated using Weblate (Albanian)
Currently translated at 99.5% (1780 of 1788 strings)
2025-01-01 09:00:45 +01:00
109247019824
df63ca5cb0
Translated using Weblate (Bulgarian)
Currently translated at 46.4% (831 of 1788 strings)
2025-01-01 09:00:44 +01:00
大王叫我来巡山
14e25349b8
Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 63.3% (1133 of 1788 strings)
2025-01-01 09:00:42 +01:00
Burak Yavuz
076a0ac6fd
Translated using Weblate (Turkish)
Currently translated at 100.0% (1788 of 1788 strings)
2025-01-01 09:00:41 +01:00
Ettore Atalan
51ef15629d
Translated using Weblate (German)
Currently translated at 97.8% (1749 of 1788 strings)
2025-01-01 09:00:40 +01:00
James Valleroy
18d2249043
Release v24.26 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v24.26
2024-12-30 20:49:26 -05:00
James Valleroy
2a165e422a
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-30 20:35:37 -05:00
James Valleroy
5fb591268e
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-30 20:06:22 -05:00
Sunil Mohan Adapa
c4b21b014b
networks: Fix error during creation of PPPoE connections
- Currently, when trying to create PPPoE connection, we get an exception that
dns_over_tls key is not found in the form's cleaned_data. Fix this by not
expecting the field to be present only for PPPoE connections.

Tests:

- Edit a regular Ethernet connection and change the value of DNS-over-TLS to all
the different values and notice that the value is updated as expected.

- Create a regular Ethernet connection with non-default value for DNS-over-TLS.
The value for DNS-over-TLS on the connection set as expected.

- Create/edit/delete of a PPPoE connection works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-30 17:38:23 -05:00
Sunil Mohan Adapa
e20e27c0fd
ui: Fix regression with margin above app title
- This extra margin was accidentally introduced when migrating to Bootstrap 5
and a generic rule was introduced to add spacing before each section that is not
the first one.

Tests:

- In app pages, icon and title are at the same level.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-30 17:29:45 -05:00
James Valleroy
fa41257565
backups: Remove unused import contextlib
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-30 08:36:48 -05:00
Sunil Mohan Adapa
fd1b1c1cbf
backups: tests: functional: Wait for pages to load after click
- So that on slow machines, the tests don't fail.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-30 08:34:17 -05:00
Sunil Mohan Adapa
e0aef43ece
backups: Handle common errors during borg operations
Closes: #2218.

- When borg can't acquire a lock due to it being busy, any borg operation can
fail. Show a readable message instead of a generic error.

- Also handle errors for archive already existing and archive to be deleted not
existing.

Tests:

- Functional tests for backup app work.

- Creating archive works with proper message. Providing the name of existing
archive shows proper error.

- Deleting archive works with proper message. Open two tabs by clicking on the
delete archive button. Then delete with one and try to delete the it again with
the next one. Proper error message is shown.

- While downloading an archive, delete an archive. Proper error message that
borg is busy is shown.

- Upload archive works. A proper success message is shown.

- Restore backup from archive works. A proper success message is shown.

- Restore backup from file upload works. A proper success message is shown after
upload and after restoration.

- Adding local repository works. A proper success message is shown.

- Adding remote repository works. A proper success message is shown when SSH key
is verified and repository is added.

- Removing repository works. A proper success message is shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-30 08:34:14 -05:00
Sunil Mohan Adapa
fd1d13f9af
backups: Use ISO timestamp for auto-naming archives
Closes: #1603.

- This introduces seconds and timezone in the name of the archive. When seconds
are not used in the name, taking backups too quickly on after the other fails as
the names clash.

Tests:

- Taking a backup works and creates the name in the expected ISO time format.

- Changing the timezone and restarting service creates timestamps in that
timezone.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-30 08:34:04 -05:00
Sunil Mohan Adapa
91270331cc
backups: Format better when showing archive time delete page
- When archives are listed using list_archives() method, return datetime objects
instead of pre-formatted strings. datetime objects can be compared easily and
shown in a more human readable format.

Tests:

- Unit tests pass.

- Backups with a future date are ignored when considering recent backup
times (when they logged to console).

- Most recent scheduled backup times are retrieved correctly (when they logged
to console).

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-30 08:34:02 -05:00
Sunil Mohan Adapa
d423b40239
backups: Require POST method for mount/unmount operations
Tests:

- Sending GET requests to the two views by opening theirs URLs in the browser
show a blank page. Actions are not performed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-30 08:33:59 -05:00
Sunil Mohan Adapa
a6b16920e2
backups: Parse borg errors from all operations and not just some
- Currently, in the repository class, if an operation fails, the error messages
from borg are interpreted and re-raised. Everywhere else, the errors are
interpreted. Fix this by wrapping privileged methods at the privileged module
level instead of a context manager at the place of calling.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-30 08:33:57 -05:00
Sunil Mohan Adapa
9b29ea960f
actions: Allow privileged methods to be decorated again
- So that we write decorators that can handle errors as needed by backups app.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-12-30 08:33:53 -05:00
Sunil Mohan Adapa
3a0db947b2
system: Add tags to all remaining apps
Tests:

- Visit the system page and notice that tags appear as expected for all items on
the page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-12-29 22:58:23 -08:00
Joseph Nuthalapati
0ae2df12a9
tags: Remove short description from system apps
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-12-29 22:58:20 -08:00
Joseph Nuthalapati
d5f840b6b1
tags: Add tags to system apps
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-12-29 22:58:17 -08:00
Joseph Nuthalapati
ce0008fca1
frontpage: Replace short description with tags
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Styling using CSS instead of bootstrap classes]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-12-29 22:57:38 -08:00
Joseph Nuthalapati
e206eb941c
zoph: Include tags from the manifest
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-12-29 22:56:35 -08:00
Joseph Nuthalapati
800464eb49
apps: Replace short description with tags in apps list
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Move style to CSS]
[sunil: Allow upto three lines of tags]
[sunil: Adjust width and padding for app cards]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-12-29 22:56:32 -08:00
Joseph Nuthalapati
4a620fd1db
tags: Replace short description with tags in app pages
Fixes #2460

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Update the style to provide spacing after tags lines]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-12-29 22:55:35 -08:00