From ef5c2ab9087036e2275366ab4d64538a7126715d Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Sun, 27 Oct 2019 00:33:08 -0700 Subject: [PATCH] gitweb: Set proper access after restoration of a backup Otherwise, if the backup contains public repos and state before backup is all private repos, then gitweb interface is not available publicly after restore. Similar case happens when all restore repos are private and state before that contains a public repos. Signed-off-by: Sunil Mohan Adapa --- plinth/modules/gitweb/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plinth/modules/gitweb/__init__.py b/plinth/modules/gitweb/__init__.py index 1f7e1a1cd..6cac4b9ca 100644 --- a/plinth/modules/gitweb/__init__.py +++ b/plinth/modules/gitweb/__init__.py @@ -184,6 +184,11 @@ def diagnose(): return results +def restore_post(packet): + """Update access after restoration of backups.""" + app.update_service_access() + + def have_public_repos(repos): """Check for public repositories""" return any((repo['access'] == 'public' for repo in repos))