Use store_true with default=False to toggle public status based on whether
'--is-public' argument is passed or not.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- User groups will only be shown when the shares are not public.
- Checking the checkbox for public shares hides the user groups.
- Unchecking the checkbox for public shares shows the user groups.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
During boot or in other situations when FreedomBox Service is offline, Let's
Encrypt certificate renewals might happen. When FreedomBox Service starts, check
on such certificates and run certificate setup mechanism in each app to use the
latest renewed certificate.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Due a missing dependency on 'names' app, 'dynamicdns' app could be initialized
before 'names' app. This will lead to domain_added signal by dynamicdns being
ignored. Dynamic DNS domain name will not be make it into the list of global
domains.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
- Remove Python code to handle the extra item in the submitted form
- The select-all checkbox is never submitted in the form since it is missing the
"name" attribute
- Replace selector ':checkbox' with the faster selector '[type=checkbox]'
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This is less tiresome for users and also improves the speed of functional tests.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Ensure that the fingerprint accepted is the one verified by user. If they
fingerprints and public keys are retrieved separately, there is chance that what
was verified by the user is not what is added to the known hosts file.
- Avoid creating a temporary file when fetching keys
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
- There is no compelling reason to make the file configurable. Simplifies
configuration file if we make it relative to FreedomBox data directory.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
- Fix encrypted repositories getting created without encryption.
- Set verified=False by during save operation for safety.
- Handle common error scenarios and show proper messages. Such as authentication
failure.
- Use pathlib to simplify file handling code.
- Split nested code for readability and do better function splits.
- Expand ~ only if it is at the beginning of the path.
- Allow empty repository path as allowed by SSH.
- Don't internationalize log messages.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
- Assume that their SSH public keys are not unverified.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
- Add docstrings.
- Add blank lines for extra readability.
- Use <span> instead of <i> tag for icon in template.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Remove auto-mounting of repositories during instantiation entirely. It is better
to explicitly mount later.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
- From SSH manual, a path may contain : if it is presented as absolute path.
Update regular expression for splitting accordingly.
- Allow Null paths similar to SSH.
- Perform a full regular expression match when splitting path.
- Simplify regular expression.
- Update tests.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
- Remove <br> tags. They have no semantics and should be replaced with uniform
styling.
- Minor changes to messages.
- Remove <p> tags from internationalized messages.
- Rename button label from ' Verify ' to 'Verify Host'. Extra spaces are
incorrect.
- Fix indentation.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
.collapsible-button is used by both "Client Apps" and the "How to verify?"
button in backups:verify-ssh-hostkey page.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
- Make url scheme consistent
- Add an FA icon to the drop-down button in VerifySshHostkeyView
- Refactoring to reduce code duplication
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Fixtures cannot be currently included into other fixtures by using
@pytest.mark.fixtures('fixture_name')
They have to be included as parameters instead.
See bug: https://github.com/pytest-dev/pytest/issues/3664
Also increase the scope of needs_root to the highest, i.e. session, so that it
can be used by any kind of fixture.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>