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 <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa 2019-10-27 00:33:08 -07:00
parent 8694849701
commit ef5c2ab908
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -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))