This is just some info I wanted to share, which might have implications for the Subversion backend (this post was originally placed at http://drupal.org/node/222201, but this project is no longer active). On my website I use the svn module for Apache (mod_dav_svn). Together with the mod_auth_mysql module, this allows for the use of the accounts in the Drupal table for Subversion authentication. To get this working, I used the following code in the Apache configuration file where the Subversion authentication rules are specified:
AuthType Basic
AuthName "Repository Name"
AuthMySQLEnable On
AuthMySQLAuthoritative On
#MySQL DB
AuthMySQLHost localhost
AuthMySQLDB ********
AuthMySQLUser ********
AuthMySQLPassword ********
#User Tables
AuthMySQLUserTable "users, users_roles"
AuthMySQLNameField users.name
AuthMySQLPasswordField users.pass
AuthMySQLPwEncryption md5
#Group Tables
AuthMySQLGroupTable "users, role, users_roles"
AuthMySQLGroupField role.rid
#WHERE Clauses
AuthMySQLUserCondition "users.status = 1 AND users.uid = users_roles.uid AND users_roles.rid IN (5, 6)"
AuthMySQLGroupCondition "users_roles.uid = users.uid AND users_roles.rid = role.rid"
#read access
<Limit GET PROPFIND OPTIONS REPORT>
Require valid-user
</Limit>
#write access
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require group 5
</LimitExcept>
In the above example, the role with rid 5 is allowed to write to the repository, while the role with rid 6 is only granted read access. No anonymous read access is granted.
Comments
Comment #1
jpetso commentedThanks for the tip - I added it to the handbook as http://drupal.org/node/441876, and closing this issue instead.