I'm trying to linking the SVN hosted on Apache on a Windows Server 2008 to the Active Directory.
I understood what do I need to do to manage the groups of users on repository level:
<Location "/SampleRepository1">
DAV svn
SVNPath H:/Repositories/SampleDirectory1
AuthBasicProvider ldap
AuthzLDAPAuthoritative Off
AuthLDAPURL "ldap://.../DC=...,DC=com?sAMAccountName?sub?(objectClass=*)" none
AuthLDAPBindDN "CN=Subversion,OU=Subversion,DC=...,DC=com"
AuthLDAPBindPassword "..."
AuthType Basic
AuthName "Use your sAMAccountName to connect. If you're unsure, write to contact@...com."
require ldap-group CN=Subversion OpenSource Contributors,OU=Subversion,DC=...,DC=com
require ldap-group CN=Subversion Administrators,OU=Subversion,DC=...,DC=com
</location>
<Location "/SampleRepository2">
DAV svn
SVNPath H:/Repositories/SampleDirectory2
AuthBasicProvider ldap
AuthzLDAPAuthoritative Off
AuthLDAPURL "ldap://.../DC=...,DC=com?sAMAccountName?sub?(objectClass=*)" none
AuthLDAPBindDN "CN=Subversion,OU=Subversion,DC=...,DC=com"
AuthLDAPBindPassword "..."
AuthType Basic
AuthName "Use your sAMAccountName to connect. If you're unsure, write to contact@...com."
require ldap-group CN=Subversion Administrators,OU=Subversion,DC=...,DC=com
</location>
What bothers me is that there is too mach duplication: if SVNPath
and ldap-group
s change from repository to repository, everything else remains the same.
How to avoid duplicating code while being able to authorize some repositories to different groups?