Skip to content

Commit f3c519a

Browse files
author
root
committed
Public repositories should be accessible for GoLang or GitDaemon
1 parent afb07d4 commit f3c519a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: app/models/concerns/gitolitable_permissions.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ def http_access_available?
2727

2828

2929
def git_access_available?
30-
project.is_public? && git_daemon_enabled?
30+
(public_project? || public_repo?) && git_daemon_enabled?
3131
end
3232

3333

3434
def go_access_available?
35-
project.is_public? && smart_http_enabled?
35+
(public_project? || public_repo?) && smart_http_enabled?
3636
end
3737

3838

Diff for: app/views/repositories/_xitolite_options.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
%p
1515
= label_tag 'repository_git_extra[git_daemon]', l(:label_enable_git_daemon)
16-
= f.check_box :git_daemon, disabled: [email protected]_public
16+
= f.check_box :git_daemon, disabled: (!repository.public_project? && !repository.public_repo?)
1717

1818
- if user_allowed_to(:create_repository_git_notifications, repository.project)
1919
%p

0 commit comments

Comments
 (0)