mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
gitweb: Fix enable auth webserver component on app init
* Fixes the gitweb app initalization when there are no public repositories and the apache2 configuration gitweb-freedombox-auth has not been enabled before (this may happen when the git repositories or apache2 configuration has been modified outside the plinth web UI). * Fix comment in the gitweb-freedombox-auth.conf apache2 configuration file. Fixes #1928 Tests performed: * The gitweb app unit and functional tests pass. * Configured all gitweb repositories as private. Stopped the plinth service. Disabled the apache2 configuration gitweb-freedombox-auth. Then starting the plinth service succeeds and gitweb-freedombox-auth configuration gets enabled. Signed-off-by: Veiko Aasa <veiko17@disroot.org> Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
This commit is contained in:
1 parent
699266fdc1
commit
eb7454d3b7
5 files changed
+48
-43
No files matched your search
@@ -92,7 +92,7 @@ class CreateRepoForm(forms.Form):
|
||||
if repo_name.endswith('.git'):
|
||||
repo_name = repo_name[:-4]
|
||||
|
||||
for repo in gitweb.app.get_repo_list():
|
||||
for repo in gitweb.get_repo_list():
|
||||
if repo_name == repo['name']:
|
||||
raise ValidationError(
|
||||
_('A repository with this name already exists.'))
|
||||
@@ -124,7 +124,7 @@ class EditRepoForm(CreateRepoForm):
|
||||
if name.endswith('.git'):
|
||||
name = name[:-4]
|
||||
|
||||
for repo in gitweb.app.get_repo_list():
|
||||
for repo in gitweb.get_repo_list():
|
||||
if name == repo['name']:
|
||||
raise ValidationError(
|
||||
_('A repository with this name already exists.'))
|
||||
|
||||
Reference in new issue
Block a user