It is being used to mean initialize the borg repository as well as creating an
instance of the repository class object. Use 'initialize' for former and
'get_instance' for latter.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Use repository class instances instead of custom ad-hoc data structures such as
repo_data.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Make store an internal implementation detail of the repository class and achieve
better abstraction.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
It is not required by any consumers. Allows for better abstraction on a complex
class.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
borg_path clearly signifies that it is to be used by borg and consumers of the
class will not be confused by it.
Also rename some repo_path variables in test cases.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Since the method is being called on Repository classes, _repository suffix is
redundant.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Make consumers depend on the repository classes instead of lower level store
API.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
get_repositories method will return repositories instead of dictionaries for
view content. This will make it usable in more situations.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Same module is being used to store/retrieve local disk repositories also.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Use sort_order property to decide which type of repositories should be listed
first.
- Remove getting repositories of a given type and retrieve all of them at the
same time.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Also make storage_type an abstract property so that derived classes are forced
to override it.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Remove incorrect instantiation of SSH repository for local disk repositories.
- Clarify the removal message to convey that backups are not removed.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
By creating an icon for 'download as pdf', we are introducing a completely new
class of buttons into FreedomBox UI. While not being essential, this causes more
learning for the user. Further, it does not exhibit the regular behavior of a
button such as hover styling and button text.
Change the icon into a regular button that user is familiar with elsewhere. Also
add label text.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
- Remove "Download Manual" card
- Create link to download manual in the header of the HTML manual
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Remove hard-coded URL for manual download]
[sunil@medhas.org Fix CSS indentation]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
- Remove "Download Manual" card
- Create link to download manual in the header of the HTML manual
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Remove hard-coded URL for manual download]
[sunil@medhas.org Fix CSS indentation]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
is_safe_url() expects allowed_hosts argument instead of host. This is an
internal method. Found by reviewing the release notes for Django 2.0, 2.1 and
2.2. This should be final change needed for Django 2.2 support.
Closes: #1518.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Closes: #1303.
Test:
Reproduce the problem with debconf-set-selections. Install tt-rss. run
debconf-set
apt install tt-rss
echo 'tt-rss tt-rss/database-type string pgsql' | debconf-set-selections
apt purge tt-rss
echo 'tt-rss tt-rss/database-type string pgsql' | debconf-set-selections
error: Cannot find a question for tt-rss/database-type
Then run try to install ttrss without patch and observe that it fails. Apply
the patch and see that ttrss is installed properly. Observe that database
configured in /etc/ttrss/database.php is 'pgsql'.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Regression was introduced in a2d07fef0b9e2ae54f98fb5209b9cb0c5fd6f456 when
backup data import from manifest was inadvertently removed.
Closes: #1636.
Test:
Create a backup with this patch and 'storage' as one of the selected apps for
backup. Try to restore the backup without the patch. Observe that it fails.
Restore the backup with the patch. Observe that it succeeds.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
When there are no snapshots present in the list of snapshots, operation to
delete all snapshots first checks that select all button and then submits the
delete snapshots button. After that it looks for delete confirmation and then
submits again. When the confirmation page is not shown, as is the case when
there are no snapshots, the button being submitted happens to be 'Create
Snapshot' button. This creates a new snapshot and the total number of snapshots
at the end of create snapshot test is 2 instead of 1.
Tests:
- Run `py.test-3 --include-functional -k snapshot`.
Closes: #1630.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This was not caught earlier because the problem was masked by turbolinks usage.
Tests:
- Install an app and see the page refreshing.
- Run manual update and see the page refreshing.
- Update Tor configuration and see the page refreshing.
- Run diagnostics from the diagnostics module and see the page refreshing.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- matrix-synapse 1.2 is already unavailable in buster-backports, testing and
unstable. It is replaced by matrix-synapse 1.3. Allow matrix-synapse 1.3 to
become available for Buster users.
- Allow upgrades to all future versions of matrix-synapse from buster-backports.
Since buster-backports does not have security updates except that provided
by the maintainer, it is best to let users be on the latest version provided
by the maintainer in buster-backports.
- We don't pick and choose among the versions uploaded to backports. Once we
allow a package to upgrade to backports version, we should continue to do that
without any further restriction. Update descriptions accordingly.
- Simplify updating the apt preferences file by providing a simple configuration
instead of creating the file on the fly.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Tests:
- When only when admin user is present, the users list does not show delete
button next to the admin user. The checkbox for admin group is disabled (but
checked) for that user in edit user form.
- When there are multiple admin users preset, the users list shows delete button
against all admin users. The checkbox for admin group is enabled (but checked)
for all admin users.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>