Show More
@@ -46,8 +46,9 b'' | |||
|
46 | 46 | Order allow,deny |
|
47 | 47 | </Location> |
|
48 | 48 | |
|
49 |
% for |
|
|
50 | <Location ${location_root_stripped}${repo_group.full_path}> | |
|
49 | % for location, parent_path in repo_group_paths: | |
|
50 | ||
|
51 | <Location ${location}> | |
|
51 | 52 | AuthType Basic |
|
52 | 53 | AuthName "Subversion proxy" |
|
53 | 54 | AuthBasicProvider anon |
@@ -55,7 +56,7 b'' | |||
|
55 | 56 | Require valid-user |
|
56 | 57 | |
|
57 | 58 | DAV svn |
|
58 |
SVNParentPath ${parent_path |
|
|
59 | SVNParentPath ${parent_path} | |
|
59 | 60 | SVNListParentPath ${'On' if svn_list_parent_path else 'Off'} |
|
60 | 61 | |
|
61 | 62 | Allow from all |
@@ -38,16 +38,23 b' def generate_mod_dav_svn_config(settings' | |||
|
38 | 38 | list_parent_path = settings[config_keys.list_parent_path] |
|
39 | 39 | location_root = settings[config_keys.location_root] |
|
40 | 40 | |
|
41 | # Render the configuration to string. | |
|
42 | template = 'rhodecode:svn_support/templates/mod-dav-svn.conf.mako' | |
|
41 | # Prepare render context. | |
|
42 | repo_group_paths = [] | |
|
43 | for repo_group in RepoGroup.get_all_repo_groups(): | |
|
44 | group_path = repo_group.full_path_splitted | |
|
45 | location = os.path.join(location_root, *group_path) | |
|
46 | parent_path = os.path.join(parent_path_root, *group_path) | |
|
47 | repo_group_paths.append((location, parent_path)) | |
|
48 | ||
|
43 | 49 | context = { |
|
44 | 50 | 'location_root': location_root, |
|
45 | 'location_root_stripped': location_root.rstrip(os.path.sep), | |
|
46 | 51 | 'parent_path_root': parent_path_root, |
|
47 | 'parent_path_root_stripped': parent_path_root.rstrip(os.path.sep), | |
|
48 | 'repo_groups': RepoGroup.get_all_repo_groups(), | |
|
52 | 'repo_group_paths': repo_group_paths, | |
|
49 | 53 | 'svn_list_parent_path': list_parent_path, |
|
50 | 54 | } |
|
55 | ||
|
56 | # Render the configuration template to string. | |
|
57 | template = 'rhodecode:svn_support/templates/mod-dav-svn.conf.mako' | |
|
51 | 58 | mod_dav_svn_config = render(template, context) |
|
52 | 59 | |
|
53 | 60 | # Write configuration to file. |
General Comments 0
You need to be logged in to leave comments.
Login now