This is just some info I wanted to share, which might have implications for the subversion module. 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, so website and Subversion are nicely integrated. To get this working, I used the following code in the Apache configuration file where the Subversion authentication rules are specified:
AuthType Basic
AuthName "My Website"
AuthMySQLEnable On
AuthMySQLHost localhost
AuthMySQLDB ******** # database name
AuthMySQLUser ******** # database username
AuthMySQLPassword ******** # database password
AuthMySQLUserTable "users, users_roles"
AuthMySQLNameField name
AuthMySQLPasswordField pass
AuthMySQLPwEncryption md5
AuthMySQLAuthoritative On
# write access
<LimitExcept GET PROPFIND OPTIONS REPORT>
AuthMySQLUserCondition "users.uid = users_roles.uid AND users_roles.rid = 5"
</LimitExcept>
# read access
<Limit GET PROPFIND OPTIONS REPORT>
AuthMySQLUserCondition "users.uid = users_roles.uid AND users_roles.rid IN (5, 6)"
</Limit>
require valid-user
the users_roles.rid correspond to the rid's of the roles on my website that provide readonly and commit access to the repository.
Now, how is this going to affect the Drupal subversion module? For one thing, it isn't necessary anymore for a user to specify his Subversion account setting. So it would be great if the linking of website accounts and Subversion accounts could be made optional in the subversion module.
Comments
Comment #1
quinntaylor commentedI've been integrating Subversion with Drupal, and this post was quite helpful. We're using Drupal 6, so I can't use the Subversion module, and we're using a prefix for our SQL tables. Also, our site (http://cocoaheads.byu.edu) is opting for a slightly different access model: our repository is publicly readable, but only users with certain Drupal roles can write to the repository. Here is an extract of our configuration for reference: (This is on OS X Leopard with MySQL 5 and mod_auth_mysql installed.)
Comment #2
leop commentedUnfortunately, my solution in the first post is incorrect. It provides no differentiation between users that have only read access and users that have both read and write access. Instead, I came up with the following solution, in which "Require valid-user" and "Require group" are used to differentiate between readonly and read / write access:
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.
Comment #3
mrconnerton commented5.x module is no longer supported.