diff --git a/plinth/modules/gitweb/__init__.py b/plinth/modules/gitweb/__init__.py index 00c751e7a..5412ed193 100644 --- a/plinth/modules/gitweb/__init__.py +++ b/plinth/modules/gitweb/__init__.py @@ -109,14 +109,14 @@ class GitwebApp(app_module.App): def _enable_public_access(self): """Allow Gitweb app to be accessed by anyone with access.""" - if self.auth_webserver.is_conf_enabled(): + if self.is_enabled(): self.auth_webserver.disable() self.set_shortcut_login_required(False) def _disable_public_access(self): """Allow Gitweb app to be accessed by logged-in users only.""" - if self.is_enabled() and not self.auth_webserver.is_conf_enabled(): + if self.is_enabled(): self.auth_webserver.enable() self.set_shortcut_login_required(True) @@ -137,14 +137,7 @@ class GitwebApp(app_module.App): class GitwebWebserverAuth(Webserver): """Component to handle Gitweb authentication webserver configuration.""" - def is_conf_enabled(self): - """Check whether Gitweb authentication configuration is enabled.""" - return super().is_enabled() - - def is_enabled(self): - """Return if configuration is enabled or public access is enabled.""" - repos = get_repo_list() - return have_public_repos(repos) or super().is_enabled() + is_leader = False def enable(self): """Enable apache configuration only if no public repository exists."""