views:

132

answers:

4

I'm planning on hiring a freelancer to work with me on a project. All of my code is on my SVN, but I don't want some of it to be available to the other programmer. That said, there are many directories, and I want the other person (who I have never met) to only access certain directories, for both read and write.

I can't find anything in SVN, other than using DAV (hell), or using pre-commit hook. How do you prevent somebody else to read the entire tree?

Alternatively, I can create another repository, but I do not wish to do that.

Thanks!

A: 

I must admit that my understanding of SVN is greatly debilitated by the lovely point-and-click VisualSVN Server :) but there, I can set permissions freely for each sub-directory. Seeing as VisualSVN is only a wrapper around the normal svn binaries, I would assume that this is definitely possible.

Update: It's definitely possible in plain SVN. Here's an article that describes setting it up in detail.

Pekka
A: 

I use VisualSVN server with its active directory integration. Restricting access involves clicking on the appropriate directories in the mmc snapin and changing the access permissions. You can do the same using the native svn user permissions.

If you're running on Linux, install a management website such as submin or usvn, and use that to put the same kind of permissions on various parts of the tree.

gbjbaanb
A: 

In your repository’s authz file, set it up like

[/]
me = rw
freelancer =

to prevent the freelancer from reading the root.

Then, for each directory you want to give him or her access to, put an entry explicitly granting it, like

[/freelancerStuff]
freelancer = rw

Here’s the documentation that describes it further.

Michael Hackner
yeah! it's funny, I had that configured! I did it over a year ago and remembered that it's unsupported. Dunno why. It actually works, I forgot all about it :) Thanks!!!
gilm
A: 

Okay. This is weird.

I had everything configured. I guess I researched this a year ago and totally forgot.

To whoever has the same problem. Upgrade your SVN to 1.6, and use authz-db file in your svnserve.conf. There is no need to install WebDAV or authz shared object for apache. This works directly from svn serve.

gilm