In a module, when URL is not avialable for a shortcut, send None instead
of an implementation specific detail on how to show description. This
allows use to change the implementation of how description is shown
without changes to modules.
- After the shortcuts were turned into a list instead of dictionary, the
descriptions stopped showing in the front page due to an 'in' check
that worked for dict. Fix this by changing the shortcuts into a
dictionary.
- Also make the key of the shortcut dict an 'id' instead of 'app' that
could create confusion how an app maps to a shortcut.
- Minor indentation fixes.
- Use a parser generated data type exposed by ruamel.yaml library to get
the necessary double-quoted strings that we want in the output file.
- Simplify reading and writing to a YAML file.
- Fix incorrect dependency of ruamel.yaml Debian package. The correct
one is python3-ruamel.yaml.
nscd monitors files in /etc and invalidates the cache automatically when
they change. However, for other mechanisms it recommends issuing a
manual flush in its manual page. Flush nscd passwd and group database
caches after all user operations (not just rename operation, just to be
sure).
- Refactor reading status log file.
- Fix hardcoded URL path into 500.html.
- Rename 'status logs' to 'status log' for consistency.
- Decorate the personal information warning. Avoid <b>.
- Add heading to status log page.
- Indentation and grammer fixes.
- So that it can be used for other applications also.
- Also remove second status icon in green and use the status loading in
it's place. This is more consistent placement of status icon.
- Also reduce the size of the icon as it is not indication for page
loading (page loading icons are large because they substitute page
content until it is loaded). This makes it consistent with other
status icon.
In a following pull request, we are expected to solve the cache timing
issue. So, show a generic error message instead of one that suggests a
timing problem.
Although there is nothing wrong with the generated POT file and the
encoding is properly set to UTF-8, Weblate failed with following error:
We have not been able to update the source file for the resource
django.pot of the project FreedomBox UI.
The URL we used to update the source file from was
https://raw.githubusercontent.com/freedombox/Plinth/master/plinth/locale/django.pot.
The exact error we encountered was:
'ascii' codec can't encode character u'\u2019' in position 31271:
ordinal not in range(128)
Current check whether the package manager is busy and getting the
unattended upgrades log requires root. This will not allow Plinth to
run as non-root. Fix this by moving the operations to actions script.
Due to permission restrictions on the configuration file (due to stored
password), it is not possible to read it as plinth user. Read it using
sudo instead.
When invoking actions, invoke them using sudo so that Plinth itself can
run as non-root. Most operations require superuser previlage. Those
that don't require superuser should not be part of the action script and
can be moved to Plinth main.
When editing an existing user, error is being thrown due to restricted
usernames check. This is due to the username matching existing
username.
Also:
- Raise the validation error on the field instead of the entire form.
- Send error code along with validation error message.
- End the validation error message with a full stop for consistency.