mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
gitweb: Fix modifying git repositories when gitweb app is disabled
Fixes #2408. - When app is disabled, continue to update the app shortcut's login required property. Otherwise, the value is current after the app is re-enabled. - When public access is enabled, the gitweb-freedombox-auth.conf configuration must be disabled. This can be done even if the configuration is already disabled or does not exist. So, continue doing this. Signed-off-by: Veiko Aasa <veiko17@disroot.org> [sunil: Perform enable public access even if app is disabled] [sunil: Perform shortcut update in all cases even if app is disabled] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
1 parent
c217fdb5c6
commit
1268898176
2 files changed
+29
-16
No files matched your search
@@ -98,7 +98,7 @@ class GitwebApp(app_module.App):
|
||||
|
||||
def post_init(self):
|
||||
"""Perform post initialization operations."""
|
||||
if not self.needs_setup() and self.is_enabled():
|
||||
if not self.needs_setup():
|
||||
self.update_service_access()
|
||||
|
||||
def set_shortcut_login_required(self, login_required):
|
||||
@@ -122,7 +122,7 @@ class GitwebApp(app_module.App):
|
||||
|
||||
def _disable_public_access(self):
|
||||
"""Allow Gitweb app to be accessed by logged-in users only."""
|
||||
if not self.auth_webserver.is_conf_enabled():
|
||||
if self.is_enabled() and not self.auth_webserver.is_conf_enabled():
|
||||
self.auth_webserver.enable()
|
||||
|
||||
self.set_shortcut_login_required(True)
|
||||
|
||||
Reference in new issue
Block a user