mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-15 09:51:21 +00:00
gitweb: Set correct access rights after enabling application
- after enabling application, do not enable Apache auth configuration if a public repository exist. Closes #1669 Signed-off-by: Veiko Aasa <veiko17@disroot.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
d05facfe04
commit
7c5837a13a
@ -147,6 +147,12 @@ class GitwebWebserverAuth(Webserver):
|
||||
repos = app.get_repo_list()
|
||||
return have_public_repos(repos) or super().is_enabled()
|
||||
|
||||
def enable(self):
|
||||
"""Enable apache configuration only if no public repository exists."""
|
||||
repos = app.get_repo_list()
|
||||
if not have_public_repos(repos):
|
||||
super().enable()
|
||||
|
||||
|
||||
def init():
|
||||
"""Initialize the module."""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user